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

Public Member Functions

 TSampledRange (size_t n_samples, T lowerBound, T upperBound)
 
size_t getNSamples () const
 
getLowerBound () const
 
getUpperBound () const
 
getDifference () const
 
bool inRange (T value) const
 

Private Attributes

size_t m_n_samples
 
m_lower_bound
 
m_upper_bound
 

Detailed Description

template<class T>
class TSampledRange< T >

An interval [lowerBound..upperBound[, and a number of samples.

Definition at line 41 of file TRange.h.

Constructor & Destructor Documentation

◆ TSampledRange()

template<class T >
TSampledRange< T >::TSampledRange ( size_t  n_samples,
lowerBound,
upperBound 
)
inline

Definition at line 44 of file TRange.h.

45  : TRange<T>(lowerBound, upperBound), m_n_samples(n_samples)
46  {
47  }
An interval [lowerBound..upperBound[.
Definition: TRange.h:24
size_t m_n_samples
Definition: TRange.h:52

Member Function Documentation

◆ getNSamples()

template<class T >
size_t TSampledRange< T >::getNSamples ( ) const
inline

Definition at line 49 of file TRange.h.

49 { return m_n_samples; }

References TSampledRange< T >::m_n_samples.

◆ getLowerBound()

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

Definition at line 29 of file TRange.h.

29 { return m_lower_bound; }
T m_lower_bound
Definition: TRange.h:36

References TRange< T >::m_lower_bound.

◆ getUpperBound()

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

Definition at line 30 of file TRange.h.

30 { return m_upper_bound; }
T m_upper_bound
Definition: TRange.h:36

References TRange< T >::m_upper_bound.

◆ getDifference()

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

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
inlineinherited

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_n_samples

template<class T >
size_t TSampledRange< T >::m_n_samples
private

Definition at line 52 of file TRange.h.

Referenced by TSampledRange< T >::getNSamples().

◆ m_lower_bound

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

◆ m_upper_bound

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

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