MINT2
Public Member Functions | Private Attributes | List of all members
RooCubicSplineKnot::S_jk Class Reference

#include <RooCubicSplineKnot.h>

Public Member Functions

 S_jk ()
 
 S_jk (double a, double b, double c)
 
 S_jk (const S_jk &other, double offset=0)
 
S_jkoperator *= (double z)
 
S_jkoperator/= (double z)
 
S_jkoperator- ()
 
S_jkoperator+= (const S_jk &other)
 
S_jkoperator-= (const S_jk &other)
 
S_jk operator * (double z) const
 
S_jk operator/ (double z) const
 
S_jk operator+ (const S_jk &other) const
 
S_jk operator- (const S_jk &other) const
 
double operator() (int j, int k) const
 

Private Attributes

double t
 
double d
 
double s
 
double o
 

Detailed Description

Definition at line 45 of file RooCubicSplineKnot.h.

Constructor & Destructor Documentation

◆ S_jk() [1/3]

RooCubicSplineKnot::S_jk::S_jk ( )
inline

◆ S_jk() [2/3]

RooCubicSplineKnot::S_jk::S_jk ( double  a,
double  b,
double  c 
)
inline

Definition at line 48 of file RooCubicSplineKnot.h.

48 : t(a*b*c), d(0.5*(a*b+a*c+b*c) ), s( 0.25*(a+b+c) ), o(0.125) { }

◆ S_jk() [3/3]

RooCubicSplineKnot::S_jk::S_jk ( const S_jk other,
double  offset = 0 
)
inline

Definition at line 49 of file RooCubicSplineKnot.h.

49  : t(other.t), d(other.d), s(other.s), o(other.o) {
50  if (!offset) return;
51  t+=offset*(-2*d+offset*(4*s-offset*o*8));
52  d+=offset*(-8*s+3*offset*o*8)/2;
53  s-=offset*3*o*8/4;
54  }

Member Function Documentation

◆ operator *()

S_jk RooCubicSplineKnot::S_jk::operator * ( double  z) const
inline

Definition at line 61 of file RooCubicSplineKnot.h.

61 { return S_jk(*this)*=z; }

◆ operator *=()

S_jk& RooCubicSplineKnot::S_jk::operator *= ( double  z)
inline

Definition at line 55 of file RooCubicSplineKnot.h.

◆ operator()()

double RooCubicSplineKnot::S_jk::operator() ( int  j,
int  k 
) const
inline

Definition at line 67 of file RooCubicSplineKnot.h.

67  {
68  if (j>k) std::swap(j,k);
69  assert(0<=j&&j<4);
70  assert(0<=k&&k<4-j); // note: for 4-j<=k<4 could return 0... but better not to invoke with those..
71  switch(3*j+k) {
72  case 0: return -t; // (0,0)
73  case 1: return d; // (0,1),(1,0)
74  case 2: return -s; // (0,2),(2,0)
75  case 3: return o; // (0,3),(3,0)
76  case 4: return -2*s; // (1,1)
77  case 5: return 3*o; // (1,2),(2,1)
78  }
79  assert(1==0);
80  return 0;
81  }

◆ operator+()

S_jk RooCubicSplineKnot::S_jk::operator+ ( const S_jk other) const
inline

Definition at line 63 of file RooCubicSplineKnot.h.

63 { return S_jk(*this)+=other; }

◆ operator+=()

S_jk& RooCubicSplineKnot::S_jk::operator+= ( const S_jk other)
inline

Definition at line 58 of file RooCubicSplineKnot.h.

58 { t+=other.t; d+=other.d; s+=other.s; o+=other.o; return *this; }

◆ operator-() [1/2]

S_jk& RooCubicSplineKnot::S_jk::operator- ( )
inline

◆ operator-() [2/2]

S_jk RooCubicSplineKnot::S_jk::operator- ( const S_jk other) const
inline

Definition at line 64 of file RooCubicSplineKnot.h.

64 { return S_jk(*this)-=other; }

◆ operator-=()

S_jk& RooCubicSplineKnot::S_jk::operator-= ( const S_jk other)
inline

Definition at line 59 of file RooCubicSplineKnot.h.

59 { t-=other.t; d-=other.d; s-=other.s; o-=other.o; return *this; }

◆ operator/()

S_jk RooCubicSplineKnot::S_jk::operator/ ( double  z) const
inline

Definition at line 62 of file RooCubicSplineKnot.h.

62 { return S_jk(*this)/=z; }

◆ operator/=()

S_jk& RooCubicSplineKnot::S_jk::operator/= ( double  z)
inline

Definition at line 56 of file RooCubicSplineKnot.h.

Member Data Documentation

◆ d

double RooCubicSplineKnot::S_jk::d
private

Definition at line 83 of file RooCubicSplineKnot.h.

◆ o

double RooCubicSplineKnot::S_jk::o
private

Definition at line 83 of file RooCubicSplineKnot.h.

◆ s

double RooCubicSplineKnot::S_jk::s
private

Definition at line 83 of file RooCubicSplineKnot.h.

◆ t

double RooCubicSplineKnot::S_jk::t
private

Definition at line 83 of file RooCubicSplineKnot.h.


The documentation for this class was generated from the following file: