mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 08:55:37 +00:00
25 lines
633 B
C++
25 lines
633 B
C++
#include <iostream>
|
|
#include <latan/AsciiFile.hpp>
|
|
|
|
using namespace std;
|
|
using namespace Latan;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
if (argc != 2)
|
|
{
|
|
cerr << "usage: " << argv[0] << " <file>" << endl;
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
string fileName = argv[1];
|
|
|
|
cout << "-- loading sample from '" << fileName << "'..." << endl;
|
|
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;
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|