Jpp  16.0.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 35 of file JSpline.hh.

Member Typedef Documentation

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

Definition at line 38 of file JSpline.hh.

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

Definition at line 39 of file JSpline.hh.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 45 of file JSpline.hh.

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

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

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

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

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

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

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

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

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

Member Data Documentation

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

Definition at line 138 of file JSpline.hh.

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

Definition at line 139 of file JSpline.hh.


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