mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-09-21 02:11:04 +01:00
big cleaning and update: switching to C++11
This commit is contained in:
24
utils/Makefile.am
Normal file
24
utils/Makefile.am
Normal file
@@ -0,0 +1,24 @@
|
||||
if CC_GNU
|
||||
COM_CFLAGS = -Wall -W -pedantic
|
||||
else
|
||||
if CC_INTEL
|
||||
COM_CFLAGS = -Wall
|
||||
endif
|
||||
endif
|
||||
|
||||
if CXX_GNU
|
||||
COM_CXXFLAGS = -Wall -W -pedantic
|
||||
else
|
||||
if CXX_INTEL
|
||||
COM_CXXFLAGS = -Wall
|
||||
endif
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
latan_sample_read
|
||||
|
||||
latan_sample_read_SOURCES = sample_read.cpp
|
||||
latan_sample_read_CFLAGS = -g -O2
|
||||
latan_sample_read_LDFLAGS = -L../latan/.libs -llatan
|
||||
|
||||
ACLOCAL_AMFLAGS = -I .buildutils/m4
|
1
utils/latan
Symbolic link
1
utils/latan
Symbolic link
@@ -0,0 +1 @@
|
||||
../latan
|
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