Jpp  15.0.2
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 34 of file JSpline.hh.

Member Typedef Documentation

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

Definition at line 37 of file JSpline.hh.

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

Definition at line 38 of file JSpline.hh.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 44 of file JSpline.hh.

44  :
45  fp_at_xmin(false, ordinate_type()),
46  fp_at_xmax(false, ordinate_type())
47  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:138
JOrdinate_t ordinate_type
Definition: JSpline.hh:37
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:137
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 56 of file JSpline.hh.

57  :
58  fp_at_xmin(true, fpAtXmin),
59  fp_at_xmax(true, fpAtXmax)
60  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:138
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:137

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 68 of file JSpline.hh.

69  {
70  fp_at_xmin.first = true;
71  fp_at_xmin.second = fp;
72  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:137
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 80 of file JSpline.hh.

81  {
82  fp_at_xmax.first = true;
83  fp_at_xmax.second = fp;
84  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:138
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 92 of file JSpline.hh.

93  {
94  return fp_at_xmin.first;
95  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:137
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 103 of file JSpline.hh.

104  {
105  return fp_at_xmax.first;
106  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:138
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 114 of file JSpline.hh.

115  {
116  if (fp_at_xmin.first)
117  return fp_at_xmin.second;
118  else
119  throw JNoValue("JSplineBounds: missing 1st derivative.");
120  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:137
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 128 of file JSpline.hh.

129  {
130  if (fp_at_xmax.first)
131  return fp_at_xmax.second;
132  else
133  throw JNoValue("JSplineBounds: missing 1st derivative.");
134  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:138

Member Data Documentation

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

Definition at line 137 of file JSpline.hh.

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

Definition at line 138 of file JSpline.hh.


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