Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Interval< field_type > Class Template Reference

Encapsulates a closed interval. More...

#include <dune/fufem/interval.hh>

Public Member Functions

field_type & operator[] (int i)
 Array-like access.
 
const field_type & operator[] (int i) const
 Const array-like access.
 
field_type projectIn (const field_type &x) const
 Project a scalar onto the interval.
 
field_type projectFromBelow (const field_type &x) const
 Fast projection onto the interval if you know that your value is smaller than your upper bound.
 
field_type projectFromAbove (const field_type &x) const
 Fast projection onto the interval if you know that your value is larger than your lower bound.
 
bool containsZero (const field_type &safety) const
 Return true if zero is contained in the interval.
 

Detailed Description

template<class field_type>
class Interval< field_type >

Encapsulates a closed interval.

Template Parameters
field_typeThe type used for real numbers

Member Function Documentation

◆ containsZero()

template<class field_type >
bool Interval< field_type >::containsZero ( const field_type &  safety) const
inline

Return true if zero is contained in the interval.

Parameters
safetyAn additive safety distance

◆ operator[]() [1/2]

template<class field_type >
field_type & Interval< field_type >::operator[] ( int  i)
inline

Array-like access.

◆ operator[]() [2/2]

template<class field_type >
const field_type & Interval< field_type >::operator[] ( int  i) const
inline

Const array-like access.

◆ projectFromAbove()

template<class field_type >
field_type Interval< field_type >::projectFromAbove ( const field_type &  x) const
inline

Fast projection onto the interval if you know that your value is larger than your lower bound.

◆ projectFromBelow()

template<class field_type >
field_type Interval< field_type >::projectFromBelow ( const field_type &  x) const
inline

Fast projection onto the interval if you know that your value is smaller than your upper bound.

◆ projectIn()

template<class field_type >
field_type Interval< field_type >::projectIn ( const field_type &  x) const
inline

Project a scalar onto the interval.


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