Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
CsMath::Interval< T, S > Class Template Reference

Represents an interval by two unsigned integers [base, base + diff]. More...

#include <cs_Math.h>

Public Member Functions

 Interval (T base, S diff, bool inv=false)
 
T lowerbound ()
 
T upperbound ()
 
bool contains (T val)
 
bool ClosureContains (T val)
 
bool InteriorContains (T val)
 

Private Attributes

T low
 
T high
 
bool invert
 

Detailed Description

template<class T, class S = T>
class CsMath::Interval< T, S >

Represents an interval by two unsigned integers [base, base + diff].

(base + diff doesn't have to be representable in the current type, the interval represented will wrap around to 0)

Constructor & Destructor Documentation

◆ Interval()

template<class T , class S = T>
CsMath::Interval< T, S >::Interval ( T  base,
S  diff,
bool  inv = false 
)
inline

Member Function Documentation

◆ ClosureContains()

template<class T , class S = T>
bool CsMath::Interval< T, S >::ClosureContains ( T  val)
inline

◆ contains()

template<class T , class S = T>
bool CsMath::Interval< T, S >::contains ( T  val)
inline

◆ InteriorContains()

template<class T , class S = T>
bool CsMath::Interval< T, S >::InteriorContains ( T  val)
inline

◆ lowerbound()

template<class T , class S = T>
T CsMath::Interval< T, S >::lowerbound ( )
inline

◆ upperbound()

template<class T , class S = T>
T CsMath::Interval< T, S >::upperbound ( )
inline

Member Data Documentation

◆ high

template<class T , class S = T>
T CsMath::Interval< T, S >::high
private

◆ invert

template<class T , class S = T>
bool CsMath::Interval< T, S >::invert
private

◆ low

template<class T , class S = T>
T CsMath::Interval< T, S >::low
private

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