mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-12-21 00:24:29 +00:00
simplification of IO interface
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <iostream>
|
||||
#include <latan/Io.hpp>
|
||||
#include <latan/AsciiFile.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace Latan;
|
||||
@@ -13,10 +13,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
string fileName = argv[1];
|
||||
AsciiFile f(fileName, File::Mode::read);
|
||||
|
||||
cout << "-- loading sample from '" << fileName << "'..." << endl;
|
||||
const DMatSample &s = f.read<DMatSample>();
|
||||
const DMatSample &s = Io::load<DMatSample, AsciiFile>(fileName);
|
||||
cout << scientific;
|
||||
cout << "central value:\n" << s[central] << endl;
|
||||
cout << "standard deviation:\n" << s.variance().cwiseSqrt() << endl;
|
||||
|
||||
Reference in New Issue
Block a user