SyTen

◆ print_result()

std::string syten::print_result ( SDef const  result,
bool const  column,
bool const  realOnly,
bool const  imagOnly,
Index const  prec,
std::string const &  prefix = "" 
)

Return a string representation of a numerical result.

Parameters
resultthe numerical result value
columnif true, print real and imaginary part as two columns
realOnlyif true and !column, print only the real part
imagOnlyif true and !column and !realOnly, print only the imaginary part
prefixprefix every printed line with this string
precoutput precision

References imag(), real(), std::setprecision(), std::setw(), and std::stringstream::str().

Referenced by calc_expval().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: