Rosetta
Public Member Functions | Private Attributes | List of all members
numeric::IntervalSet< T > 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

◆ IntervalSet() [1/3]

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

◆ IntervalSet() [2/3]

template<typename T >
numeric::IntervalSet< T >::IntervalSet ( T  start,
T  end 
)
inline

◆ IntervalSet() [3/3]

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

Member Function Documentation

◆ clear()

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

◆ endpoints()

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

vector of interval set end points

References numeric::IntervalSet< T >::endpoints_.

◆ is_inside()

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

determine if a point is within one of the intervals

References numeric::IntervalSet< T >::endpoints_, create_a3b_hbs::i, and subloop_histogram::size.

◆ length()

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

◆ operator&()

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

References numeric::IntervalSet< T >::endpoints_, numeric::IntervalSet< T >::push_back(), and basic::options::OptionKeys::ufv::right.

◆ push_back()

template<typename T >
void numeric::IntervalSet< T >::push_back ( T  start,
T  end 
)
inline

◆ random_point()

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

References numeric::IntervalSet< T >::endpoints_, create_a3b_hbs::i, create_a3b_hbs::j, ObjexxFCL::len(), numeric::IntervalSet< T >::length(), numeric::random::RandomGenerator::random_range(), RG, subloop_histogram::size, and numeric::random::RandomGenerator::uniform().

◆ set() [1/2]

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

set the inverval set to contain a single interval

References end, numeric::IntervalSet< T >::endpoints_, and basic::options::OptionKeys::cutoutdomain::start.

◆ set() [2/2]

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

References numeric::IntervalSet< T >::endpoints_.

Member Data Documentation

◆ endpoints_

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

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