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

36 lines
1.1 KiB
C++
Raw Normal View History

2014-03-03 12:41:48 +00:00
#include <iostream>
2016-03-08 19:37:51 +00:00
#include <LatAnalyze/FitInterface.hpp>
2014-03-03 12:41:48 +00:00
using namespace std;
using namespace Latan;
int main(void)
{
2016-03-08 19:37:51 +00:00
FitInterface f;
2014-03-03 12:41:48 +00:00
f.addYDim("q1");
f.addYDim("q2");
f.addXDim("x1", 6);
f.addXDim("x2", 5);
f.addXDim("x3", 5);
f.registerDataPoint(f.dataIndex(0,0,0), 0);
f.registerDataPoint(f.dataIndex(1,1,1), 0);
f.registerDataPoint(f.dataIndex(2,2,2), 0);
f.registerDataPoint(f.dataIndex(2,3,3), 0);
f.registerDataPoint(f.dataIndex(0,0,0), 1);
f.registerDataPoint(f.dataIndex(1,1,1), 1);
f.registerDataPoint(f.dataIndex(2,2,3), 1);
f.fitPoint(false, f.dataIndex(1,1,1), 1);
f.assumeXXCorrelated(true, 0, 0, 0, 1);
f.assumeXXCorrelated(true, 1, 1, 0, 1);
f.assumeXXCorrelated(true, 2, 2, 0, 1);
f.assumeYYCorrelated(true, 0, 0, f.dataIndex(0,0,0), f.dataIndex(1,1,1));
f.assumeYYCorrelated(true, 1, 1, f.dataIndex(0,0,0), f.dataIndex(2,2,3));
f.assumeXYCorrelated(true, 0, 0, 0, f.dataIndex(1,1,1));
cout << f << endl;
f.updateLayout();
DEBUG_MAT(f.makeCorrFilter());
2014-03-03 12:41:48 +00:00
return EXIT_SUCCESS;
}