line 517 in matt.hpp is part of the at method. So the problem is with dft_output_vector.at



all_vector.push_back (dft_output_vector.at <double>(i,j));


You'll need to debug the code to find...