BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
TRange< T > Class Template Reference
Inheritance diagram for TRange< T >:
Collaboration diagram for TRange< T >:

Public Member Functions

 TRange (T lowerBound, T upperBound)
 
virtual ~TRange ()
 
getLowerBound () const
 
getUpperBound () const
 
getDifference () const
 
bool inRange (T value) const
 

Private Attributes

m_lower_bound
 
m_upper_bound
 

Detailed Description

template<class T>
class TRange< T >

An interval [lowerBound..upperBound[.

Definition at line 23 of file TRange.h.

Constructor & Destructor Documentation

◆ TRange()

template<class T >
TRange< T >::TRange ( lowerBound,
upperBound 
)
inline

Definition at line 26 of file TRange.h.

26 : m_lower_bound(lowerBound), m_upper_bound(upperBound) {}
T m_lower_bound
Definition: TRange.h:36
T m_upper_bound
Definition: TRange.h:36

◆ ~TRange()

template<class T >
virtual TRange< T >::~TRange ( )
inlinevirtual

Definition at line 27 of file TRange.h.

27 {}

Member Function Documentation

◆ getLowerBound()

template<class T >
T TRange< T >::getLowerBound ( ) const
inline

Definition at line 29 of file TRange.h.

29 { return m_lower_bound; }

References TRange< T >::m_lower_bound.

◆ getUpperBound()

template<class T >
T TRange< T >::getUpperBound ( ) const
inline

Definition at line 30 of file TRange.h.

30 { return m_upper_bound; }

References TRange< T >::m_upper_bound.

◆ getDifference()

template<class T >
T TRange< T >::getDifference ( ) const
inline

Definition at line 31 of file TRange.h.

31 { return m_upper_bound - m_lower_bound; }

References TRange< T >::m_lower_bound, and TRange< T >::m_upper_bound.

◆ inRange()

template<class T >
bool TRange< T >::inRange ( value) const
inline

Definition at line 33 of file TRange.h.

33 { return value >= m_lower_bound && value < m_upper_bound; }

References TRange< T >::m_lower_bound, and TRange< T >::m_upper_bound.

Member Data Documentation

◆ m_lower_bound

template<class T >
T TRange< T >::m_lower_bound
private

◆ m_upper_bound

template<class T >
T TRange< T >::m_upper_bound
private

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