class
TxtStatWriterContents
ASCII statistics writer class that facilitates outputing statistics to text files.
Base classes
- class Writer
Constructors, destructors, conversion operators
-
TxtStatWriter(const std::string& filename,
tk::
ctr:: TxtFloatFormatType format = tk:: ctr:: TxtFloatFormatType:: DEFAULT, std::streamsize precision = std::cout.precision(), std::ios_base::openmode mode = std::ios_base::out) explicit - Constructor.
Public functions
- void header(const std::vector<std::string>& nameOrd, const std::vector<std::string>& nameCen, const std::vector<std::string>& nameExt) const
- Write out statistics file header.
-
auto stat(uint64_t it,
tk::
real t, const std::vector<tk:: real>& ordinary, const std::vector<tk:: real>& central, const std::vector<tk:: real>& extra) -> std::size_t - Write statistics file.
Function documentation
tk:: TxtStatWriter:: TxtStatWriter(const std::string& filename,
tk:: ctr:: TxtFloatFormatType format = tk:: ctr:: TxtFloatFormatType:: DEFAULT,
std::streamsize precision = std::cout.precision(),
std::ios_base::openmode mode = std::ios_base::out) explicit
Constructor.
Parameters | |
---|---|
filename in | Output filename to which output the statistics |
format in | Configure floating-point output format ASCII output |
precision in | Configure precision for floating-point ASCII output |
mode in | Configure file open mode |
void tk:: TxtStatWriter:: header(const std::vector<std::string>& nameOrd,
const std::vector<std::string>& nameCen,
const std::vector<std::string>& nameExt) const
Write out statistics file header.
Parameters | |
---|---|
nameOrd in | Vector of strings with the names of ordinary moments |
nameCen in | Vector of strings with the names of central moments |
nameExt in | Vector of strings with the names of extra data |
std::size_t tk:: TxtStatWriter:: stat(uint64_t it,
tk:: real t,
const std::vector<tk:: real>& ordinary,
const std::vector<tk:: real>& central,
const std::vector<tk:: real>& extra)
Write statistics file.
Parameters | |
---|---|
it in | Iteration counter |
t in | Time |
ordinary in | Vector with the ordinary moment statistics |
central in | Vector with the central moment statistics |
extra in | Vector with extra data to be also written (besides stats) |
Returns | The total number of statistics written to the output file |