Skip to content

Instantly share code, notes, and snippets.

View wieczorek1990's full-sized avatar
💭
Looking for remote programming work.

Łukasz Wieczorek wieczorek1990

💭
Looking for remote programming work.
View GitHub Profile
@wieczorek1990
wieczorek1990 / simple-dft.cpp
Created October 6, 2014 20:38
Simple Discrete Fourier Transform
// Based on: http://nayuki.eigenstate.org/page/how-to-implement-the-discrete-fourier-transform
#include <iostream>
#include <vector>
#include <complex>
#include <cmath>
#include <cstdlib>
using namespace std;
vector<complex<double> > compute_dft(vector<complex<double> > in) {
int n = in.size();