mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-12-21 08:34:30 +00:00
big cleaning and update: switching to C++11
This commit is contained in:
22
utils/sample_read.cpp
Normal file
22
utils/sample_read.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
#include <latan/Dataset.hpp>
|
||||
#include <latan/Io.hpp>
|
||||
#include <latan/Sample.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace Latan;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
Dataset<DMat, AsciiFile> dataset;
|
||||
DMatSample s, r;
|
||||
RandGen g;
|
||||
|
||||
dataset.load("man", "HVP_2_2_000_00_0_0");
|
||||
s = dataset.bootstrapMean(100, g);
|
||||
|
||||
cout << "central value:\n" << s[central] << endl;
|
||||
cout << "standard deviation:\n" << s.variance().cwiseSqrt() << endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user