Rosetta 3.3
Public Member Functions
numeric::IntervalSet< T > Class Template Reference

#include <IntervalSet.hh>

Collaboration diagram for numeric::IntervalSet< T >:
Collaboration graph
[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

template<typename T>
class numeric::IntervalSet< T >


Constructor & Destructor Documentation

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

Member Function Documentation

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

clear the contents

template<typename T>
utility::vector0<T> 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 ( 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 ( start,
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 ( start1,
end1,
start2,
end2 
) [inline]

set the interval set to contain two intervals

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

set the inverval set to contain a single interval


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines