1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00

AsciiFile: double precision writing

This commit is contained in:
Antonin Portelli 2015-01-28 17:20:51 +00:00
parent 9c6dedd3d6
commit c1b8597ecc

View File

@ -55,12 +55,15 @@ AsciiFile::~AsciiFile(void)
// access //////////////////////////////////////////////////////////////////////
void AsciiFile::save(const DMat &m, const std::string &name)
{
const auto defaultPrec = fileStream_.precision(defaultDoublePrec);
checkWritability();
isParsed_ = false;
fileStream_ << "#L latan_begin mat " << name << endl;
fileStream_ << m.cols() << endl;
fileStream_ << scientific << m << endl;
fileStream_ << "#L latan_end mat " << endl;
fileStream_.precision(defaultPrec);
}
void AsciiFile::save(const DMatSample &s, const std::string &name)