mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-07 10:05:55 +01:00
more deactivation of the old fit interface
This commit is contained in:
parent
016a29e3df
commit
352caf30b6
28
lib/Plot.cpp
28
lib/Plot.cpp
@ -167,20 +167,20 @@ PlotData::PlotData(const DMatSample &x, const DVec &y)
|
||||
setCommand("'" + tmpFileName + "' u 1:3:2 w xerr");
|
||||
}
|
||||
|
||||
PlotData::PlotData(const XYStatData &data, const Index i, const Index j)
|
||||
{
|
||||
DMat d(data.getNData(), 4);
|
||||
string usingCmd, tmpFileName;
|
||||
|
||||
d.col(0) = data.x(i);
|
||||
d.col(2) = data.y(j);
|
||||
d.col(1) = data.xxVar(i, i).diagonal().array().sqrt();
|
||||
d.col(3) = data.yyVar(j, j).diagonal().array().sqrt();
|
||||
usingCmd = (data.isXExact(i)) ? "u 1:3:4 w yerr" : "u 1:3:2:4 w xyerr";
|
||||
tmpFileName = dumpToTmpFile(d);
|
||||
pushTmpFile(tmpFileName);
|
||||
setCommand("'" + tmpFileName + "' " + usingCmd);
|
||||
}
|
||||
//PlotData::PlotData(const XYStatData &data, const Index i, const Index j)
|
||||
//{
|
||||
// DMat d(data.getNData(), 4);
|
||||
// string usingCmd, tmpFileName;
|
||||
//
|
||||
// d.col(0) = data.x(i);
|
||||
// d.col(2) = data.y(j);
|
||||
// d.col(1) = data.xxVar(i, i).diagonal().array().sqrt();
|
||||
// d.col(3) = data.yyVar(j, j).diagonal().array().sqrt();
|
||||
// usingCmd = (data.isXExact(i)) ? "u 1:3:4 w yerr" : "u 1:3:2:4 w xyerr";
|
||||
// tmpFileName = dumpToTmpFile(d);
|
||||
// pushTmpFile(tmpFileName);
|
||||
// setCommand("'" + tmpFileName + "' " + usingCmd);
|
||||
//}
|
||||
|
||||
// PlotHLine constructor ///////////////////////////////////////////////////////
|
||||
PlotHLine::PlotHLine(const double y)
|
||||
|
@ -21,9 +21,11 @@
|
||||
#define Latan_Plot_hpp_
|
||||
|
||||
#include <LatAnalyze/Global.hpp>
|
||||
#include <LatAnalyze/Function.hpp>
|
||||
#include <LatAnalyze/Mat.hpp>
|
||||
#include <LatAnalyze/MatSample.hpp>
|
||||
#include <LatAnalyze/Histogram.hpp>
|
||||
#include <LatAnalyze/XYStatData.hpp>
|
||||
//#include <LatAnalyze/XYStatData.hpp>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
@ -92,7 +94,7 @@ public:
|
||||
PlotData(const DMatSample &x, const DMatSample &y);
|
||||
PlotData(const DVec &x, const DMatSample &y);
|
||||
PlotData(const DMatSample &x, const DVec &y);
|
||||
PlotData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||
//PlotData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||
// destructor
|
||||
virtual ~PlotData(void) = default;
|
||||
};
|
||||
|
@ -34,12 +34,12 @@ TabFunction::TabFunction(const DVec &x, const DVec &y,
|
||||
setData(x, y);
|
||||
}
|
||||
|
||||
TabFunction::TabFunction(const XYStatData &data, const Index i, const Index j,
|
||||
const InterpType interpType)
|
||||
: interpType_(interpType)
|
||||
{
|
||||
setData(data, i, j);
|
||||
}
|
||||
//TabFunction::TabFunction(const XYStatData &data, const Index i, const Index j,
|
||||
// const InterpType interpType)
|
||||
//: interpType_(interpType)
|
||||
//{
|
||||
// setData(data, i, j);
|
||||
//}
|
||||
|
||||
// access //////////////////////////////////////////////////////////////////////
|
||||
void TabFunction::setData(const DVec &x, const DVec &y)
|
||||
@ -54,10 +54,10 @@ void TabFunction::setData(const DVec &x, const DVec &y)
|
||||
}
|
||||
}
|
||||
|
||||
void TabFunction::setData(const XYStatData &data, const Index i, const Index j)
|
||||
{
|
||||
setData(data.x(i), data.y(j));
|
||||
}
|
||||
//void TabFunction::setData(const XYStatData &data, const Index i, const Index j)
|
||||
//{
|
||||
// setData(data.x(i), data.y(j));
|
||||
//}
|
||||
|
||||
// function call ///////////////////////////////////////////////////////////////
|
||||
double TabFunction::operator()(const double *arg) const
|
||||
@ -154,11 +154,11 @@ DoubleFunction Latan::interpolate(const DVec &x, const DVec &y,
|
||||
return TabFunction(x, y, interpType).makeFunction();
|
||||
}
|
||||
|
||||
DoubleFunction Latan::interpolate(const XYStatData &data, const Index i,
|
||||
const Index j, const InterpType interpType)
|
||||
{
|
||||
return TabFunction(data, i, j, interpType).makeFunction();
|
||||
}
|
||||
//DoubleFunction Latan::interpolate(const XYStatData &data, const Index i,
|
||||
// const Index j, const InterpType interpType)
|
||||
//{
|
||||
// return TabFunction(data, i, j, interpType).makeFunction();
|
||||
//}
|
||||
|
||||
map<double, double>::const_iterator TabFunction::nearest(const double x) const
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <LatAnalyze/Global.hpp>
|
||||
#include <LatAnalyze/Function.hpp>
|
||||
#include <LatAnalyze/Math.hpp>
|
||||
#include <LatAnalyze/XYStatData.hpp>
|
||||
//#include <LatAnalyze/XYStatData.hpp>
|
||||
|
||||
BEGIN_LATAN_NAMESPACE
|
||||
|
||||
@ -47,13 +47,13 @@ public:
|
||||
TabFunction(void) = default;
|
||||
TabFunction(const DVec &x, const DVec &y,
|
||||
const InterpType interpType = InterpType::LINEAR);
|
||||
TabFunction(const XYStatData &data, const Index i = 0, const Index j = 0,
|
||||
const InterpType interpType = InterpType::LINEAR);
|
||||
//TabFunction(const XYStatData &data, const Index i = 0, const Index j = 0,
|
||||
// const InterpType interpType = InterpType::LINEAR);
|
||||
// destructor
|
||||
virtual ~TabFunction(void) = default;
|
||||
// access
|
||||
void setData(const DVec &x, const DVec &y);
|
||||
void setData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||
// void setData(const XYStatData &data, const Index i = 0, const Index j = 0);
|
||||
// function call
|
||||
double operator()(const double *arg) const;
|
||||
// factory
|
||||
@ -67,9 +67,9 @@ private:
|
||||
|
||||
DoubleFunction interpolate(const DVec &x, const DVec &y,
|
||||
const InterpType interpType = InterpType::LINEAR);
|
||||
DoubleFunction interpolate(const XYStatData &data, const Index i = 0,
|
||||
const Index j = 0,
|
||||
const InterpType interpType = InterpType::LINEAR);
|
||||
//DoubleFunction interpolate(const XYStatData &data, const Index i = 0,
|
||||
// const Index j = 0,
|
||||
// const InterpType interpType = InterpType::LINEAR);
|
||||
|
||||
END_LATAN_NAMESPACE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user