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

35 lines
927 B
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);
cout << f << endl;
DEBUG_VAR(f.getYFitSize());
DEBUG_VAR(f.getYFitSize(0));
DEBUG_VAR(f.getYFitSize(1));
DEBUG_VAR(f.getXFitSize());
DEBUG_VAR(f.getXFitSize(0));
DEBUG_VAR(f.getXFitSize(1));
DEBUG_VAR(f.getXFitSize(2));
2014-03-03 12:41:48 +00:00
return EXIT_SUCCESS;
}