Loading...
Searching...
No Matches
clampOp< T > Struct Template Reference

Unary function for applying component-wise clamping. More...

#include <MinMaxOps.H>

Public Member Functions

 clampOp (const T &min, const T &max)
 Construct from min/max limits. No validity checks.
 clampOp (const MinMax< T > &range)
 Construct from min/max range. No validity checks.
 clampOp (Foam::zero_one)
 Construct as 0-1 min/max range.
T operator() (const T &val) const

Public Attributes

const T lower
const T upper

Detailed Description

template<class T>
struct Foam::clampOp< T >

Unary function for applying component-wise clamping.

Definition at line 67 of file MinMaxOps.H.

Constructor & Destructor Documentation

◆ clampOp() [1/3]

template<class T>
clampOp ( const T & min,
const T & max )
inline

Construct from min/max limits. No validity checks.

Definition at line 75 of file MinMaxOps.H.

References lower, Foam::max(), Foam::min(), Foam::T(), and upper.

Referenced by clampOp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clampOp() [2/3]

template<class T>
clampOp ( const MinMax< T > & range)
inline

Construct from min/max range. No validity checks.

Definition at line 84 of file MinMaxOps.H.

References lower, Foam::max(), Foam::min(), range, and upper.

Here is the call graph for this function:

◆ clampOp() [3/3]

template<class T>
clampOp ( Foam::zero_one )
inline

Construct as 0-1 min/max range.

Definition at line 93 of file MinMaxOps.H.

References clampOp(), and Foam::T().

Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<class T>
T operator() ( const T & val) const
inline

Definition at line 98 of file MinMaxOps.H.

References lower, Foam::max(), Foam::min(), Foam::T(), and upper.

Here is the call graph for this function:

Member Data Documentation

◆ lower

template<class T>
const T lower

Definition at line 69 of file MinMaxOps.H.

Referenced by clampOp(), clampOp(), and operator()().

◆ upper

template<class T>
const T upper

Definition at line 70 of file MinMaxOps.H.

Referenced by clampOp(), clampOp(), and operator()().


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