Poplar and PopLibs
poplar::GenericInterval< T > Struct Template Reference

This class represents an interval that is closed at its lower bound and open at its upper bound. More...

#include <Interval.hpp>

Public Member Functions

 GenericInterval ()=default
 Initialise with begin and end set to their default value of 0.
 
const T & lower () const
 Get the lower bound of the half open interval. More...
 
const T & upper () const
 Get the upper bound of the half open interval. More...
 
size () const
 Get the size of the interval. More...
 

Detailed Description

template<class T>
struct poplar::GenericInterval< T >

This class represents an interval that is closed at its lower bound and open at its upper bound.

It is almost always used with T = std::size_t, for which there is a convenient Interval typedef.

Member Function Documentation

◆ lower()

template<class T >
const T & poplar::GenericInterval< T >::lower ( ) const
inline

Get the lower bound of the half open interval.

Returns
the lower bound of the interval.

◆ size()

template<class T >
T poplar::GenericInterval< T >::size ( ) const
inline

Get the size of the interval.

Returns
The size of the interval.

◆ upper()

template<class T >
const T & poplar::GenericInterval< T >::upper ( ) const
inline

Get the upper bound of the half open interval.

Returns
the upper bound of the interval.

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