Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JTOOLS::JSplineBounds< JOrdinate_t > Class Template Reference

Auxiliary class to define first derivates of the spline function at the two extrema. More...

#include <JSpline.hh>

Public Types

typedef JOrdinate_t ordinate_type
 
typedef JLANG::JClass< ordinate_type >::argument_type argument_type
 

Public Member Functions

 JSplineBounds ()
 Default constructor.
 
 JSplineBounds (argument_type fpAtXmin, argument_type fpAtXmax)
 Constructor.
 
void setFirstDerivativeAtXmin (argument_type fp)
 Set first derivative of function at minimal abscissa value.
 
void setFirstDerivativeAtXmax (argument_type fp)
 Set first derivative of function at maximal abscissa value.
 
const bool & hasFirstDerivativeAtXmin () const
 Has first derivative of function at minimal abscissa value.
 
const bool & hasFirstDerivativeAtXmax () const
 Has first derivative of function at maximal abscissa value.
 
ordinate_type getFirstDerivativeAtXmin () const
 Get first derivative of function at minimal abscissa value.
 
ordinate_type getFirstDerivativeAtXmax () const
 Get first derivative of function at maximal abscissa value.
 

Protected Attributes

std::pair< bool, ordinate_typefp_at_xmin
 
std::pair< bool, ordinate_typefp_at_xmax
 

Detailed Description

template<class JOrdinate_t>
class JTOOLS::JSplineBounds< JOrdinate_t >

Auxiliary class to define first derivates of the spline function at the two extrema.

Definition at line 37 of file JSpline.hh.

Member Typedef Documentation

◆ ordinate_type

template<class JOrdinate_t >
JOrdinate_t JTOOLS::JSplineBounds< JOrdinate_t >::ordinate_type

Definition at line 40 of file JSpline.hh.

◆ argument_type

template<class JOrdinate_t >
JLANG::JClass<ordinate_type>::argument_type JTOOLS::JSplineBounds< JOrdinate_t >::argument_type

Definition at line 41 of file JSpline.hh.

Constructor & Destructor Documentation

◆ JSplineBounds() [1/2]

template<class JOrdinate_t >
JTOOLS::JSplineBounds< JOrdinate_t >::JSplineBounds ( )
inline

Default constructor.

Definition at line 47 of file JSpline.hh.

47 :
48 fp_at_xmin(false, ordinate_type()),
50 {}
std::pair< bool, ordinate_type > fp_at_xmin
Definition JSpline.hh:140
JOrdinate_t ordinate_type
Definition JSpline.hh:40
std::pair< bool, ordinate_type > fp_at_xmax
Definition JSpline.hh:141

◆ JSplineBounds() [2/2]

template<class JOrdinate_t >
JTOOLS::JSplineBounds< JOrdinate_t >::JSplineBounds ( argument_type fpAtXmin,
argument_type fpAtXmax )
inline

Constructor.

Parameters
fpAtXmin1st derivative at minimal abscissa value
fpAtXmax1st derivative at maximal abscissa value

Definition at line 59 of file JSpline.hh.

60 :
61 fp_at_xmin(true, fpAtXmin),
62 fp_at_xmax(true, fpAtXmax)
63 {}

Member Function Documentation

◆ setFirstDerivativeAtXmin()

template<class JOrdinate_t >
void JTOOLS::JSplineBounds< JOrdinate_t >::setFirstDerivativeAtXmin ( argument_type fp)
inline

Set first derivative of function at minimal abscissa value.

Parameters
fp1st derivative

Definition at line 71 of file JSpline.hh.

72 {
73 fp_at_xmin.first = true;
74 fp_at_xmin.second = fp;
75 }

◆ setFirstDerivativeAtXmax()

template<class JOrdinate_t >
void JTOOLS::JSplineBounds< JOrdinate_t >::setFirstDerivativeAtXmax ( argument_type fp)
inline

Set first derivative of function at maximal abscissa value.

Parameters
fp1st derivative

Definition at line 83 of file JSpline.hh.

84 {
85 fp_at_xmax.first = true;
86 fp_at_xmax.second = fp;
87 }

◆ hasFirstDerivativeAtXmin()

template<class JOrdinate_t >
const bool & JTOOLS::JSplineBounds< JOrdinate_t >::hasFirstDerivativeAtXmin ( ) const
inline

Has first derivative of function at minimal abscissa value.

Returns
true if 1st derivative is set; else false

Definition at line 95 of file JSpline.hh.

96 {
97 return fp_at_xmin.first;
98 }

◆ hasFirstDerivativeAtXmax()

template<class JOrdinate_t >
const bool & JTOOLS::JSplineBounds< JOrdinate_t >::hasFirstDerivativeAtXmax ( ) const
inline

Has first derivative of function at maximal abscissa value.

Returns
true if 1st derivative is set; else false

Definition at line 106 of file JSpline.hh.

107 {
108 return fp_at_xmax.first;
109 }

◆ getFirstDerivativeAtXmin()

template<class JOrdinate_t >
ordinate_type JTOOLS::JSplineBounds< JOrdinate_t >::getFirstDerivativeAtXmin ( ) const
inline

Get first derivative of function at minimal abscissa value.

Returns
1st derivative

Definition at line 117 of file JSpline.hh.

118 {
119 if (fp_at_xmin.first)
120 return fp_at_xmin.second;
121 else
122 throw JNoValue("JSplineBounds: missing 1st derivative.");
123 }

◆ getFirstDerivativeAtXmax()

template<class JOrdinate_t >
ordinate_type JTOOLS::JSplineBounds< JOrdinate_t >::getFirstDerivativeAtXmax ( ) const
inline

Get first derivative of function at maximal abscissa value.

Returns
1st derivative

Definition at line 131 of file JSpline.hh.

132 {
133 if (fp_at_xmax.first)
134 return fp_at_xmax.second;
135 else
136 throw JNoValue("JSplineBounds: missing 1st derivative.");
137 }

Member Data Documentation

◆ fp_at_xmin

template<class JOrdinate_t >
std::pair<bool, ordinate_type> JTOOLS::JSplineBounds< JOrdinate_t >::fp_at_xmin
protected

Definition at line 140 of file JSpline.hh.

◆ fp_at_xmax

template<class JOrdinate_t >
std::pair<bool, ordinate_type> JTOOLS::JSplineBounds< JOrdinate_t >::fp_at_xmax
protected

Definition at line 141 of file JSpline.hh.


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