43 explicit NRVec(
int n);
44 NRVec(
const T& a,
int n);
45 NRVec(
const T* a,
int n);
53 inline int size()
const;
65 for(
int i = 0; i < n; ++i) {
73 for(
int i = 0; i < n; i++) {
81 for(
int i = 0; i < n; i++) {
89 for(
int i = 0; i <
nn; i++) {
106 for(
int i = 0; i < nn; i++) {
116 for(
int i = 0; i < nn; i++) {
158 NRMat(
const T& a,
int n,
int m);
159 NRMat(
const T* a,
int n,
int m);
167 inline int nrows()
const;
168 inline int ncols()
const;
180 v[0] =
new T[m * n]();
181 for(
int i = 1; i < n; i++) {
185 for(
int i = 0; i < n; ++i) {
186 for(
int j = 0; j < m; ++j) {
195 v[0] =
new T[m * n]();
196 for(
int i = 1; i < n; i++) {
199 for(
int i = 0; i < n; i++) {
200 for(
int j = 0; j < m; j++) {
209 v[0] =
new T[m * n]();
210 for(
int i = 1; i < n; i++) {
213 for(
int i = 0; i < n; i++) {
214 for(
int j = 0; j < m; j++) {
223 v[0] =
new T[
mm *
nn]();
224 for(
int i = 1; i <
nn; i++) {
225 v[i] =
v[i - 1] +
mm;
227 for(
int i = 0; i <
nn; i++) {
228 for(
int j = 0; j <
mm; j++) {
241 if(nn != rhs.
nn || mm != rhs.
mm) {
247 v[0] =
new T[mm * nn];
249 for(
int i = 1; i < nn; i++) {
250 v[i] = v[i - 1] + mm;
252 for(
int i = 0; i < nn; i++) {
253 for(
int j = 0; j < mm; j++) {
264 for(
int i = 0; i < nn; i++) {
265 for(
int j = 0; j < mm; j++) {
317 inline const T*
const*
operator[](
int i)
const;
318 inline int dim1()
const;
319 inline int dim2()
const;
320 inline int dim3()
const;
336 v[0] =
new T*[n * m];
337 v[0][0] =
new T[n * m * k];
338 for(
int j = 1; j < m; j++) {
339 v[0][j] =
v[0][j - 1] + k;
341 for(
int i = 1; i < n; i++) {
343 v[i][0] =
v[i - 1][0] + m * k;
344 for(
int j = 1; j < m; j++) {
345 v[i][j] =
v[i][j - 1] + k;
522inline T
MAX(
const T& a,
const T& b)
524 return b > a ? (b) : (a);
527inline float MAX(
const double& a,
const float& b)
529 return b > a ? (b) :
static_cast<float>(a);
532inline float MAX(
const float& a,
const double& b)
534 return b > a ?
static_cast<float>(b) : (a);
538inline T
SIGN(
const T& a,
const T& b)
541 return (a >= 0 ? a : -a);
543 return (a >= 0 ? -a : a);
546inline float SIGN(
const float& a,
const double& b)
549 return (a >= 0 ? a : -a);
551 return (a >= 0 ? -a : a);
554inline float SIGN(
const double& a,
const float& b)
557 return static_cast<float>(a >= 0 ? a : -a);
559 return static_cast<float>(a >= 0 ? -a : a);
570inline std::complex<float>
operator+(
const double& a,
const std::complex<float>& b)
572 return static_cast<float>(a) + b;
575inline std::complex<float>
operator+(
const std::complex<float>& a,
const double& b)
577 return a +
static_cast<float>(b);
580inline std::complex<float>
operator-(
const double& a,
const std::complex<float>& b)
582 return static_cast<float>(a) - b;
585inline std::complex<float>
operator-(
const std::complex<float>& a,
const double& b)
587 return a -
static_cast<float>(b);
590inline std::complex<float>
operator*(
const double& a,
const std::complex<float>& b)
592 return static_cast<float>(a) * b;
595inline std::complex<float>
operator*(
const std::complex<float>& a,
const double& b)
597 return a *
static_cast<float>(b);
600inline std::complex<float>
operator/(
const double& a,
const std::complex<float>& b)
602 return static_cast<float>(a) / b;
605inline std::complex<float>
operator/(
const std::complex<float>& a,
const double& b)
607 return a /
static_cast<float>(b);
635 void Fit(TH1*
hist, TF1* func);
647 std::cerr <<
"Numerical Recipes run-time error..." << std::endl;
648 std::cerr << error_text << std::endl;
649 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)