Skip to content

Conversation

leios
Copy link
Member

@leios leios commented Oct 23, 2018

I screwed up with #476 . At first glance, it looked fine, but there were obvious updates necessary. This should match #420.

@rajdakin Sorry for prematurely merging.

@leios leios added Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) Hacktoberfest The label for all Hacktoberfest related things! labels Oct 23, 2018
}

void fft(std::vector<std::complex<double>> x, int n, bool inverse) {
std::complex<double> y[n];
Copy link
Contributor

@zsparal zsparal Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunately not standard C++. The way to solve this issue is:

std::vector<std::complex<double>> y(x.size(), std::complex<double>(0.0, 0.0));

This way you don't need either the memset or the push_back loop

berquist and others added 6 commits October 28, 2018 17:34
Co-Authored-By: leios <jrs.schloss@gmail.com>
Co-Authored-By: leios <jrs.schloss@gmail.com>
Co-Authored-By: leios <jrs.schloss@gmail.com>
Co-Authored-By: leios <jrs.schloss@gmail.com>
Co-Authored-By: leios <jrs.schloss@gmail.com>
@berquist
Copy link
Member

Ok, looking good.

@berquist berquist merged commit 7460f2a into algorithm-archivists:master Oct 31, 2018
@leios leios deleted the energy_calc_fix_cpp branch December 23, 2018 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hacktoberfest The label for all Hacktoberfest related things! Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.)

3 participants