Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
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. More...
 
 JSplineBounds (argument_type fpAtXmin, argument_type fpAtXmax)
 Constructor. More...
 
void setFirstDerivativeAtXmin (argument_type fp)
 Set first derivative of function at minimal abscissa value. More...
 
void setFirstDerivativeAtXmax (argument_type fp)
 Set first derivative of function at maximal abscissa value. More...
 
const bool & hasFirstDerivativeAtXmin () const
 Has first derivative of function at minimal abscissa value. More...
 
const bool & hasFirstDerivativeAtXmax () const
 Has first derivative of function at maximal abscissa value. More...
 
ordinate_type getFirstDerivativeAtXmin () const
 Get first derivative of function at minimal abscissa value. More...
 
ordinate_type getFirstDerivativeAtXmax () const
 Get first derivative of function at maximal abscissa value. More...
 

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

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

Definition at line 40 of file JSpline.hh.

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

Definition at line 41 of file JSpline.hh.

Constructor & Destructor Documentation

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()),
49  fp_at_xmax(false, ordinate_type())
50  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:141
JOrdinate_t ordinate_type
Definition: JSpline.hh:40
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:140
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  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:141
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:140

Member Function Documentation

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  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:140
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  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:141
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  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:140
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  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:141
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  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:140
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  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:141

Member Data Documentation

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.

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: