Jpp  18.3.0-rc.1
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 36 of file JSpline.hh.

Member Typedef Documentation

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

Definition at line 39 of file JSpline.hh.

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

Definition at line 40 of file JSpline.hh.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 46 of file JSpline.hh.

46  :
47  fp_at_xmin(false, ordinate_type()),
48  fp_at_xmax(false, ordinate_type())
49  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:140
JOrdinate_t ordinate_type
Definition: JSpline.hh:39
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:139
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 58 of file JSpline.hh.

59  :
60  fp_at_xmin(true, fpAtXmin),
61  fp_at_xmax(true, fpAtXmax)
62  {}
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:140
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:139

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

71  {
72  fp_at_xmin.first = true;
73  fp_at_xmin.second = fp;
74  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:139
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 82 of file JSpline.hh.

83  {
84  fp_at_xmax.first = true;
85  fp_at_xmax.second = fp;
86  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:140
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 94 of file JSpline.hh.

95  {
96  return fp_at_xmin.first;
97  }
std::pair< bool, ordinate_type > fp_at_xmin
Definition: JSpline.hh:139
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 105 of file JSpline.hh.

106  {
107  return fp_at_xmax.first;
108  }
std::pair< bool, ordinate_type > fp_at_xmax
Definition: JSpline.hh:140
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 116 of file JSpline.hh.

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

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

Member Data Documentation

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

Definition at line 139 of file JSpline.hh.

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

Definition at line 140 of file JSpline.hh.


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