Rosetta 3.3
numeric::IntervalSet< T > Class Template Reference

`#include <IntervalSet.hh>`

Collaboration diagram for numeric::IntervalSet< T >:
[legend]

List of all members.

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

## Constructor & Destructor Documentation

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

## Member Function Documentation

template<typename T>
 void numeric::IntervalSet< T >::clear ( ) ` [inline]`

clear the contents

template<typename T>
 utility::vector0 const& numeric::IntervalSet< T >::endpoints ( ) const` [inline]`

vector of interval set end points

Referenced by numeric::IntervalSet< double >::operator&(), and numeric::operator<<().

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

determine if a point is within one of the intervals

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

calculate the total length of all the intervals

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

template<typename T>
 IntervalSet numeric::IntervalSet< T >::operator& ( IntervalSet< T > const & right ) ` [inline]`

calculate the intersection of two IntervalSets

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

add an interval to the end of the set

Referenced by numeric::IntervalSet< double >::operator&().

template<typename T>
 T numeric::IntervalSet< T >::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 T>
 void numeric::IntervalSet< T >::set ( T start1, T end1, T start2, T end2 ) ` [inline]`

set the interval set to contain two intervals

template<typename T>
 void numeric::IntervalSet< T >::set ( T start, T end ) ` [inline]`

set the inverval set to contain a single interval

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