PARTONS/NumA++  
Numerical Analysis C++ routines
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
NumA::Interval< T > Class Template Reference

Class defining an interval (with given bounds and step). More...

Public Types

enum  StepMode { NORMAL = 0 , LOG = 1 }
 Type of interval. More...
 

Public Member Functions

 Interval (T lowerBound, T upperBound, T step=1, Interval::StepMode stepMode=NORMAL)
 Constructor. More...
 
std::vector< T > computeSteps () const
 
getLowerBound () const
 
void setLowerBound (T lowerBound)
 
getStep () const
 
void setStep (T step)
 
getUpperBound () const
 
void setUpperBound (T upperBound)
 

Static Public Member Functions

static std::vector< T > computeNodes (T lowerBound, T upperBound, size_t num=10, Interval::StepMode stepMode=NORMAL)
 Static function that computes the nodes of an interval for a chosen number of nodes. More...
 

Private Attributes

m_lowerBound
 Lower bound of the interval. More...
 
m_upperBound
 Upper bound of the interval. More...
 
m_step
 Step. More...
 
Interval::StepMode m_stepMode
 Type of interval. More...
 

Detailed Description

template<typename T>
class NumA::Interval< T >

Class defining an interval (with given bounds and step).

Member Enumeration Documentation

◆ StepMode

template<typename T >
enum NumA::Interval::StepMode

Type of interval.

Enumerator
NORMAL 

Linear interval.

LOG 

Logarithmic interval.

Constructor & Destructor Documentation

◆ Interval()

template<typename T >
NumA::Interval< T >::Interval ( lowerBound,
upperBound,
step = 1,
Interval< T >::StepMode  stepMode = NORMAL 
)
inline

Constructor.

Parameters
lowerBoundLower bound of the interval.
upperBoundUpper bound of the interval.
stepValue of the step.
stepModeType of interval.

Member Function Documentation

◆ computeNodes()

template<typename T >
static std::vector<T> NumA::Interval< T >::computeNodes ( lowerBound,
upperBound,
size_t  num = 10,
Interval< T >::StepMode  stepMode = NORMAL 
)
inlinestatic

Static function that computes the nodes of an interval for a chosen number of nodes.

Parameters
lowerBoundLower bound of the interval.
upperBoundUpper bound of the interval.
numNumber of nodes.
stepModeType of interval.
Returns
Nodes.

◆ computeSteps()

template<typename T >
std::vector<T> NumA::Interval< T >::computeSteps ( ) const
inline
Returns
Nodes of interval.

◆ getLowerBound()

template<typename T >
T NumA::Interval< T >::getLowerBound ( ) const
inline
Returns
Lower bound of the interval.

◆ getStep()

template<typename T >
T NumA::Interval< T >::getStep ( ) const
inline
Returns
Step.

◆ getUpperBound()

template<typename T >
T NumA::Interval< T >::getUpperBound ( ) const
inline
Returns
Upper bound of the interval.

◆ setLowerBound()

template<typename T >
void NumA::Interval< T >::setLowerBound ( lowerBound)
inline
Parameters
lowerBoundLower bound of the interval.

◆ setStep()

template<typename T >
void NumA::Interval< T >::setStep ( step)
inline
Parameters
stepValue of the step.

◆ setUpperBound()

template<typename T >
void NumA::Interval< T >::setUpperBound ( upperBound)
inline
Parameters
upperBoundUpper bound of the interval.

Member Data Documentation

◆ m_lowerBound

template<typename T >
T NumA::Interval< T >::m_lowerBound
private

Lower bound of the interval.

◆ m_step

template<typename T >
T NumA::Interval< T >::m_step
private

Step.

◆ m_stepMode

template<typename T >
Interval::StepMode NumA::Interval< T >::m_stepMode
private

Type of interval.

◆ m_upperBound

template<typename T >
T NumA::Interval< T >::m_upperBound
private

Upper bound of the interval.


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