46 explicit NRVec(
int n);
47 NRVec(
const T& a,
int n);
48 NRVec(
const T* a,
int n);
56 inline int size()
const;
68 for(
int i = 0; i < n; ++i) {
76 for(
int i = 0; i < n; i++) {
84 for(
int i = 0; i < n; i++) {
92 for(
int i = 0; i <
nn; i++) {
109 for(
int i = 0; i < nn; i++) {
119 for(
int i = 0; i < nn; i++) {
161 NRMat(
const T& a,
int n,
int m);
162 NRMat(
const T* a,
int n,
int m);
170 inline int nrows()
const;
171 inline int ncols()
const;
183 v[0] =
new T[m * n]();
184 for(
int i = 1; i < n; i++) {
188 for(
int i = 0; i < n; ++i) {
189 for(
int j = 0; j < m; ++j) {
198 v[0] =
new T[m * n]();
199 for(
int i = 1; i < n; i++) {
202 for(
int i = 0; i < n; i++) {
203 for(
int j = 0; j < m; j++) {
212 v[0] =
new T[m * n]();
213 for(
int i = 1; i < n; i++) {
216 for(
int i = 0; i < n; i++) {
217 for(
int j = 0; j < m; j++) {
226 v[0] =
new T[
mm *
nn]();
227 for(
int i = 1; i <
nn; i++) {
228 v[i] =
v[i - 1] +
mm;
230 for(
int i = 0; i <
nn; i++) {
231 for(
int j = 0; j <
mm; j++) {
244 if(nn != rhs.
nn || mm != rhs.
mm) {
250 v[0] =
new T[mm * nn];
252 for(
int i = 1; i < nn; i++) {
253 v[i] = v[i - 1] + mm;
255 for(
int i = 0; i < nn; i++) {
256 for(
int j = 0; j < mm; j++) {
267 for(
int i = 0; i < nn; i++) {
268 for(
int j = 0; j < mm; j++) {
320 inline const T*
const*
operator[](
int i)
const;
321 inline int dim1()
const;
322 inline int dim2()
const;
323 inline int dim3()
const;
339 v[0] =
new T*[n * m];
340 v[0][0] =
new T[n * m * k];
341 for(
int j = 1; j < m; j++) {
342 v[0][j] =
v[0][j - 1] + k;
344 for(
int i = 1; i < n; i++) {
346 v[i][0] =
v[i - 1][0] + m * k;
347 for(
int j = 1; j < m; j++) {
348 v[i][j] =
v[i][j - 1] + k;
525inline T
MAX(
const T& a,
const T& b)
527 return b > a ? (b) : (a);
530inline float MAX(
const double& a,
const float& b)
532 return b > a ? (b) :
static_cast<float>(a);
535inline float MAX(
const float& a,
const double& b)
537 return b > a ?
static_cast<float>(b) : (a);
541inline T
SIGN(
const T& a,
const T& b)
543 return b >= 0 ? (a >= 0 ? a : -a) : (a >= 0 ? -a : a);
546inline float SIGN(
const float& a,
const double& b)
548 return b >= 0 ? (a >= 0 ? a : -a) : (a >= 0 ? -a : a);
551inline float SIGN(
const double& a,
const float& b)
553 return b >= 0 ?
static_cast<float>(a >= 0 ? a : -a) :
static_cast<float>(a >= 0 ? -a : a);
564inline std::complex<float>
operator+(
const double& a,
const std::complex<float>& b)
566 return static_cast<float>(a) + b;
569inline std::complex<float>
operator+(
const std::complex<float>& a,
const double& b)
571 return a +
static_cast<float>(b);
574inline std::complex<float>
operator-(
const double& a,
const std::complex<float>& b)
576 return static_cast<float>(a) - b;
579inline std::complex<float>
operator-(
const std::complex<float>& a,
const double& b)
581 return a -
static_cast<float>(b);
584inline std::complex<float>
operator*(
const double& a,
const std::complex<float>& b)
586 return static_cast<float>(a) * b;
589inline std::complex<float>
operator*(
const std::complex<float>& a,
const double& b)
591 return a *
static_cast<float>(b);
594inline std::complex<float>
operator/(
const double& a,
const std::complex<float>& b)
596 return static_cast<float>(a) / b;
599inline std::complex<float>
operator/(
const std::complex<float>& a,
const double& b)
601 return a /
static_cast<float>(b);
629 void Fit(TH1*
hist, TF1* func);
638 inline void nrerror(
const std::string& error_text)
641 std::cerr <<
"Numerical Recipes run-time error..." << std::endl;
642 std::cerr << error_text << std::endl;
643 std::cerr <<
"...now exiting to system..." << std::endl;
NRMat3d(NRMat3d &&) noexcept=default
NRMat3d(const NRMat3d &)=default
NRMat(NRMat &&rhs) noexcept=default
NRMat & operator=(NRMat &&rhs) noexcept=default
NRVec & operator=(NRVec &&rhs) noexcept=default
NRVec(NRVec &&rhs) noexcept=default
void nrerror(const std::string &error_text)
void covsrt(Mat_IO_double &covar, Vec_I_BOOL &ia, int mfit)
TLMFitter(const TLMFitter &)=default
TLMFitter(TLMFitter &&) noexcept=default
int integrator(Vec_I_double &x, Vec_I_double &y, Vec_double &sig, Vec_I_double &W, Vec_IO_double &a, Vec_double &dyda, int chisqnumber, const double &bin_width, Vec_double &yfit, const int &bin)
void SetFitterRange(int min, int max)
void mrqcof(Vec_I_double &x, Vec_I_double &y, Vec_double &sig, Vec_IO_double &a, Vec_I_BOOL &ia, Mat_O_double &alpha, Vec_O_double &beta, double &chisq, Vec_I_double &W, double &chisqexp)
void mrqmin(Vec_I_double &x, Vec_I_double &y, Vec_double &sig, Vec_IO_double &a, Vec_I_BOOL &ia, Mat_O_double &covar, Mat_O_double &alpha, double &chisq, Vec_I_double &W, double &alamda)
*******************************************************************/
void gaussj(Mat_IO_double &a, Mat_IO_double &b)
void funcs(const double &x, Vec_IO_double &a, double &y, Vec_O_double &dyda)
void Fit(TH1 *hist, TF1 *func)
std::complex< float > operator+(const double &a, const std::complex< float > &b)
std::complex< float > operator-(const double &a, const std::complex< float > &b)
NRMat & operator=(const NRMat &rhs)
T MAX(const T &a, const T &b)
std::complex< float > operator/(const double &a, const std::complex< float > &b)
NRVec & operator=(const NRVec &rhs)
T SIGN(const T &a, const T &b)
std::complex< float > operator*(const double &a, const std::complex< float > &b)