Rosetta  2019.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
numeric::IntervalSet< typename > Class Template Reference

#include <IntervalSet.hh>

Public Member Functions

 IntervalSet ()
 
 IntervalSet (T start, T end)
 
 IntervalSet (T start1, T end1, T start2, T end2)
 
utility::vector0< T > const & endpoints () const
 vector of interval set end points More...
 
void clear ()
 clear the contents More...
 
void set (T start, T end)
 set the inverval set to contain a single interval More...
 
void set (T start1, T end1, T start2, T end2)
 set the interval set to contain two intervals More...
 
void push_back (T start, T end)
 add an interval to the end of the set More...
 
T length ()
 calculate the total length of all the intervals More...
 
bool is_inside (T point)
 determine if a point is within one of the intervals More...
 
IntervalSet operator& (IntervalSet const &right)
 calculate the intersection of two IntervalSets More...
 
T random_point (random::RandomGenerator &RG)
 pick a random number uniformly from all the intervals More...
 

Private Attributes

utility::vector0< Tendpoints_
 

Constructor & Destructor Documentation

template<typename >
numeric::IntervalSet< typename >::IntervalSet ( )
inline
template<typename >
numeric::IntervalSet< typename >::IntervalSet ( T  start,
T  end 
)
inline
template<typename >
numeric::IntervalSet< typename >::IntervalSet ( T  start1,
T  end1,
T  start2,
T  end2 
)
inline

Member Function Documentation

template<typename >
void numeric::IntervalSet< typename >::clear ( )
inline
template<typename >
utility::vector0<T> const& numeric::IntervalSet< typename >::endpoints ( ) const
inline

vector of interval set end points

template<typename >
bool numeric::IntervalSet< typename >::is_inside ( T  point)
inline

determine if a point is within one of the intervals

template<typename >
T numeric::IntervalSet< typename >::length ( )
inline

calculate the total length of all the intervals

Referenced by numeric::IntervalSet< double >::random_point().

template<typename >
IntervalSet numeric::IntervalSet< typename >::operator& ( IntervalSet< typename > const &  right)
inline

calculate the intersection of two IntervalSets

Parameters
[in]right- the second Interval set
Returns
a new IntervalSet
template<typename >
void numeric::IntervalSet< typename >::push_back ( T  start,
T  end 
)
inline

add an interval to the end of the set

template<typename >
T numeric::IntervalSet< typename >::random_point ( random::RandomGenerator RG)
inline

pick a random number uniformly from all the intervals

Parameters
[in]RG- random number generator to use
Returns
random number
template<typename >
void numeric::IntervalSet< typename >::set ( T  start,
T  end 
)
inline

set the inverval set to contain a single interval

template<typename >
void numeric::IntervalSet< typename >::set ( T  start1,
T  end1,
T  start2,
T  end2 
)
inline

set the interval set to contain two intervals

Member Data Documentation

template<typename >
utility::vector0<T> numeric::IntervalSet< typename >::endpoints_
private

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