STK++ 0.9.13
STK::hidden::MinSafeVisitor< Type_ > Struct Template Reference

Visitor computing safely the min of all the coefficients of the Array. More...

#include <STK_Visitors.h>

Public Types

typedef Type_ Type
 
typedef RemoveConst< Type >::Type constTypeConst
 

Public Member Functions

 MinSafeVisitor ()
 
void operator() (Type const &value, int i, int j)
 
void operator() (Type const &value, int i)
 
TypeConst result () const
 

Public Attributes

Type res_
 

Detailed Description

template<typename Type_>
struct STK::hidden::MinSafeVisitor< Type_ >

Visitor computing safely the min of all the coefficients of the Array.

See also
ExprBase::minElt(int, int)

Definition at line 166 of file STK_Visitors.h.

Member Typedef Documentation

◆ Type

template<typename Type_ >
typedef Type_ STK::hidden::MinSafeVisitor< Type_ >::Type

Definition at line 168 of file STK_Visitors.h.

◆ TypeConst

template<typename Type_ >
typedef RemoveConst<Type>::Type const& STK::hidden::MinSafeVisitor< Type_ >::TypeConst

Definition at line 169 of file STK_Visitors.h.

Constructor & Destructor Documentation

◆ MinSafeVisitor()

template<typename Type_ >
STK::hidden::MinSafeVisitor< Type_ >::MinSafeVisitor ( )
inline

Definition at line 172 of file STK_Visitors.h.

172: res_(Arithmetic<Type>::max()) {}

Member Function Documentation

◆ operator()() [1/2]

template<typename Type_ >
void STK::hidden::MinSafeVisitor< Type_ >::operator() ( Type const value,
int  i 
)
inline

Definition at line 175 of file STK_Visitors.h.

176 { if (Arithmetic<Type>::isFinite(value)) { res_ = std::min(res_,value);}}
static bool isFinite(Type const &x)

References STK::hidden::MinSafeVisitor< Type_ >::res_.

◆ operator()() [2/2]

template<typename Type_ >
void STK::hidden::MinSafeVisitor< Type_ >::operator() ( Type const value,
int  i,
int  j 
)
inline

Definition at line 173 of file STK_Visitors.h.

174 { if (Arithmetic<Type>::isFinite(value)) { res_ = std::min(res_,value);} }

References STK::hidden::MinSafeVisitor< Type_ >::res_.

◆ result()

template<typename Type_ >
TypeConst STK::hidden::MinSafeVisitor< Type_ >::result ( ) const
inline

Definition at line 177 of file STK_Visitors.h.

177{ return res_;}

References STK::hidden::MinSafeVisitor< Type_ >::res_.

Member Data Documentation

◆ res_


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