TF++, Miscellaneous classes and modules in C++:

◆ write_blitztable()

template<class T >
void tfxx::hacks::write_blitztable ( const blitz::Array< T, 1 > &  array,
const char *  filename,
const double &  dx = 1. 
)

create grepg file from complex array

Parameters
any1D blitz array
filenamename of file to write to
dxx-sampling to simulate

Definition at line 55 of file hack_blitztotable.h.

58 {
59  std::ofstream os(filename);
60  for (int i=array.lbound(blitz::firstDim);
61  i<=array.ubound(blitz::secondDim); i++)
62  {
63  os << dx*(i-1) << " "
64  << array(i) << " "
65  << std::abs(array(i)) << std::endl;
66  }
67 }