ant
A2 ant: class-based analysis framework
ant::PiecewiseInterval< T > Class Template Reference

#include <piecewise_interval.h>

+ Inheritance diagram for ant::PiecewiseInterval< T >:
+ Collaboration diagram for ant::PiecewiseInterval< T >:

Public Types

using interval_t = ant::interval< T >
 

Public Member Functions

bool Contains (const T &x) const
 Test if any interval contains x. More...
 
void Compact ()
 Simplify the list by joining intervals that overlap May reduce the number of intervals in the list and speed up following Contains() checks a bit. More...
 
interval_t EnclosingInterval () const
 
bool operator== (const PiecewiseInterval< T > &rhs) const
 Check equality. Two PiecewiseIntervals are equal if they contain exactly the same intervals. More...
 
Area () const
 

Friends

std::ostream & operator<< (std::ostream &stream, const PiecewiseInterval &o)
 
std::istream & operator>> (std::istream &out, PiecewiseInterval< T > &t)
 

Member Typedef Documentation

◆ interval_t

template<typename T>
using ant::PiecewiseInterval< T >::interval_t = ant::interval<T>

Member Function Documentation

◆ Area()

template<typename T>
T ant::PiecewiseInterval< T >::Area ( ) const
inline

◆ Compact()

template<typename T>
void ant::PiecewiseInterval< T >::Compact ( )
inline

Simplify the list by joining intervals that overlap May reduce the number of intervals in the list and speed up following Contains() checks a bit.

◆ Contains()

template<typename T>
bool ant::PiecewiseInterval< T >::Contains ( const T &  x) const
inline

Test if any interval contains x.

Parameters
xValue to check
Returns
contained yes/no

◆ EnclosingInterval()

template<typename T>
interval_t ant::PiecewiseInterval< T >::EnclosingInterval ( ) const
inline

◆ operator==()

template<typename T>
bool ant::PiecewiseInterval< T >::operator== ( const PiecewiseInterval< T > &  rhs) const
inline

Check equality. Two PiecewiseIntervals are equal if they contain exactly the same intervals.

Parameters
rhs
Returns

Friends And Related Function Documentation

◆ operator<<

template<typename T>
std::ostream& operator<< ( std::ostream &  stream,
const PiecewiseInterval< T > &  o 
)
friend

◆ operator>>

template<typename T>
std::istream& operator>> ( std::istream &  out,
PiecewiseInterval< T > &  t 
)
friend

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