g4tools  5.4.0
Public Member Functions | Protected Attributes | List of all members
tools::spline::cubic_poly Class Reference
Inheritance diagram for tools::spline::cubic_poly:
Inheritance graph
[legend]
Collaboration diagram for tools::spline::cubic_poly:
Collaboration graph
[legend]

Public Member Functions

 cubic_poly ()
 
 cubic_poly (double x, double y, double b, double c, double d)
 
 cubic_poly (cubic_poly const &a_from)
 
cubic_polyoperator= (cubic_poly const &a_from)
 
double & B ()
 
double & C ()
 
double & D ()
 
double eval (double x) const
 
- Public Member Functions inherited from tools::spline::base_poly
 base_poly ()
 
 base_poly (double x, double y)
 
virtual ~base_poly ()
 
 base_poly (base_poly const &a_from)
 
base_polyoperator= (base_poly const &a_from)
 
const double & X () const
 
const double & Y () const
 
double & X ()
 
double & Y ()
 

Protected Attributes

double fB
 
double fC
 
double fD
 
- Protected Attributes inherited from tools::spline::base_poly
double fX
 
double fY
 

Detailed Description

Definition at line 41 of file spline.

Constructor & Destructor Documentation

◆ cubic_poly() [1/3]

tools::spline::cubic_poly::cubic_poly ( )
inline

Definition at line 43 of file spline.

43 :fB(0), fC(0), fD(0) {}

◆ cubic_poly() [2/3]

tools::spline::cubic_poly::cubic_poly ( double  x,
double  y,
double  b,
double  c,
double  d 
)
inline

Definition at line 44 of file spline.

44 :base_poly(x,y), fB(b), fC(c), fD(d) {}

◆ cubic_poly() [3/3]

tools::spline::cubic_poly::cubic_poly ( cubic_poly const &  a_from)
inline

Definition at line 46 of file spline.

47  :base_poly(a_from), fB(a_from.fB), fC(a_from.fC), fD(a_from.fD) {}

Member Function Documentation

◆ B()

double& tools::spline::cubic_poly::B ( )
inline

Definition at line 57 of file spline.

57 {return fB;}

◆ C()

double& tools::spline::cubic_poly::C ( )
inline

Definition at line 58 of file spline.

58 {return fC;}

◆ D()

double& tools::spline::cubic_poly::D ( )
inline

Definition at line 59 of file spline.

59 {return fD;}

◆ eval()

double tools::spline::cubic_poly::eval ( double  x) const
inline

Definition at line 60 of file spline.

60 {double dx=x-fX;return (fY+dx*(fB+dx*(fC+dx*fD)));}

◆ operator=()

cubic_poly& tools::spline::cubic_poly::operator= ( cubic_poly const &  a_from)
inline

Definition at line 48 of file spline.

48  {
49  if(this==&a_from) return *this;
50  base_poly::operator=(a_from);
51  fB = a_from.fB;
52  fC = a_from.fC;
53  fD = a_from.fD;
54  return *this;
55  }

Member Data Documentation

◆ fB

double tools::spline::cubic_poly::fB
protected

Definition at line 62 of file spline.

◆ fC

double tools::spline::cubic_poly::fC
protected

Definition at line 63 of file spline.

◆ fD

double tools::spline::cubic_poly::fD
protected

Definition at line 64 of file spline.


The documentation for this class was generated from the following file:
tools::spline::cubic_poly::fB
double fB
Definition: spline:62
tools::spline::base_poly::operator=
base_poly & operator=(base_poly const &a_from)
Definition: spline:25
tools::spline::base_poly::base_poly
base_poly()
Definition: spline:20
tools::spline::base_poly::fX
double fX
Definition: spline:37
tools::spline::cubic_poly::fD
double fD
Definition: spline:64
tools::spline::cubic_poly::fC
double fC
Definition: spline:63
tools::spline::base_poly::fY
double fY
Definition: spline:38