BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Class describing the unbinned data sets (just x coordinates values) of any dimensions
There is the option to construct UnBindata copying the data in (using the DataVector class) or using pointer to external data (DataWrapper) class. In general is found to be more efficient to copy the data. In case of really large data sets for limiting memory consumption then the other option can be used Specialized constructor exists for using external data up to 3 dimensions. When the data are copying in the number of points can be set later (or re-set) using Initialize and the data are inserted one by one using the Add method. It is mandatory to set the size before using the Add method. @ingroup FitData
Definition at line 42 of file UnBinData.h.
Public Member Functions | |
UnBinData (const DataOptions &opt, const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false) | |
UnBinData (const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false) | |
UnBinData (unsigned int maxpoints, const double *dataX, const DataRange &range) | |
UnBinData (unsigned int maxpoints, const double *dataX, const double *dataY, const DataRange &range, bool isWeighted=false) | |
UnBinData (unsigned int maxpoints, const double *dataX, const double *dataY, const double *dataZ, const DataRange &range, bool isWeighted=false) | |
template<class Iterator > | |
UnBinData (unsigned int maxpoints, unsigned int dim, Iterator dataItr, const DataRange &range, bool isWeighted=false) | |
UnBinData (unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false) | |
UnBinData (unsigned int n, const double *dataX) | |
UnBinData (unsigned int n, const double *dataX, const double *dataY, bool isWeighted=false) | |
UnBinData (unsigned int n, const double *dataX, const double *dataY, const double *dataZ, bool isWeighted=false) | |
template<class Iterator > | |
UnBinData (unsigned int n, unsigned int dim, Iterator dataItr, bool isWeighted=false) | |
virtual | ~UnBinData () |
void | Add (const double *x) |
void | Add (const double *x, double w) |
void | Add (double x) |
void | Add (double x, double y) |
void | Add (double x, double y, double z) |
void | Append (unsigned int newPoints, unsigned int dim=1, bool isWeighted=false) |
bool | IsWeighted () const |
unsigned int | NDim () const |
double | Weight (unsigned int ipoint) const |
const double * | WeightsPtr (unsigned int ipoint) const |
Private Member Functions | |
UnBinData (const UnBinData &) | |
copy constructor (private) More... | |
UnBinData & | operator= (const UnBinData &) |
assignment operator (private) More... | |
Private Attributes | |
bool | fWeighted |
|
inlineexplicit |
constructor from dimension of point and max number of points (to pre-allocate vector)
Definition at line 50 of file UnBinData.h.
References fWeighted.
|
inlineexplicit |
constructor from range and default option
Definition at line 63 of file UnBinData.h.
References fWeighted.
|
inline |
|
inline |
constructor for 1D external data (data are not copied inside)
Definition at line 87 of file UnBinData.h.
|
inline |
constructor for 2D external data (data are not copied inside) or 1D data with a weight (if isWeighted = true)
Definition at line 97 of file UnBinData.h.
|
inline |
constructor for 3D external data (data are not copied inside) or 2D data with a weight (if isWeighted = true)
Definition at line 108 of file UnBinData.h.
|
inline |
constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The apssed dim refers just to the coordinate size
Definition at line 123 of file UnBinData.h.
References fWeighted.
|
inline |
constructor for 1D data and a range (data are copied inside according to the given range)
Definition at line 135 of file UnBinData.h.
|
inline |
constructor for 2D data and a range (data are copied inside according to the given range) or 1 1D data set + weight. If is weighted dataY is the pointer to the list of the weights
Definition at line 146 of file UnBinData.h.
|
inline |
constructor for 3D data and a range (data are copied inside according to the given range) or a 2D data set + weights. If is weighted dataZ is the pointer to the list of the weights
Definition at line 157 of file UnBinData.h.
|
inline |
constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin
Definition at line 170 of file UnBinData.h.
|
inlineprivate |
copy constructor (private)
Definition at line 178 of file UnBinData.h.
|
inlinevirtual |
destructor, delete pointer to internal data or external data wrapper
Definition at line 186 of file UnBinData.h.
|
inline |
add multi-dim coordinate data
Definition at line 235 of file UnBinData.h.
|
inline |
add multi-dim coordinate data + weight
Definition at line 243 of file UnBinData.h.
References fWeighted.
|
inline |
preallocate a data set given size and dimension of the coordinates if a vector already exists with correct dimension (point size) extend the existing one to a total size of maxpoints (equivalent to a Resize) add one dim coordinate data (unweighted)
Definition at line 200 of file UnBinData.h.
References fWeighted.
|
inline |
add 2-dim coordinate data can also be used to add 1-dim data with a weight
Definition at line 212 of file UnBinData.h.
|
inline |
add 3-dim coordinate data can also be used to add 2-dim data with a weight
Definition at line 224 of file UnBinData.h.
|
inline |
|
inline |
|
inline |
assignment operator (private)
Definition at line 180 of file UnBinData.h.
|
inline |
|
inline |
|
private |
Definition at line 298 of file UnBinData.h.
Referenced by UnBinData(), Add(), Append(), IsWeighted(), NDim(), Weight(), and WeightsPtr().