STK++ 0.9.13
STK::hidden::MinEltSafeVisitor< Type > Struct Template Reference

Visitor computing safely the minimal coefficient with its value and indexes. More...

#include <STK_Visitors.h>

Inheritance diagram for STK::hidden::MinEltSafeVisitor< Type >:
Inheritance graph

Public Member Functions

 MinEltSafeVisitor ()
 
void operator() (Type const &value, int i, int j)
 
- Public Member Functions inherited from STK::hidden::EltVisitor2DBase< Type >
 EltVisitor2DBase ()
 
TypeConst result () const
 

Additional Inherited Members

- Public Types inherited from STK::hidden::EltVisitor2DBase< Type >
typedef Type Type
 
typedef RemoveConst< Type >::Type constTypeConst
 
- Public Attributes inherited from STK::hidden::EltVisitor2DBase< Type >
int row_
 
int col_
 
Type res_
 

Detailed Description

template<typename Type>
struct STK::hidden::MinEltSafeVisitor< Type >

Visitor computing safely the minimal coefficient with its value and indexes.

See also
STK::ExprBase::minSafeElt(int, int), STK::ExprBase::minSafeElt(int)

Definition at line 98 of file STK_Visitors.h.

Constructor & Destructor Documentation

◆ MinEltSafeVisitor()

template<typename Type >
STK::hidden::MinEltSafeVisitor< Type >::MinEltSafeVisitor ( )
inline

Definition at line 100 of file STK_Visitors.h.

100 : EltVisitor2DBase<Type>()
101 { this->res_ = Arithmetic<Type>::max(); }

References STK::hidden::EltVisitor2DBase< Type >::res_.

Member Function Documentation

◆ operator()()

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

Definition at line 102 of file STK_Visitors.h.

103 {
104 if (Arithmetic<Type>::isFinite(value) && (value < this->res_))
105 { this->res_ = value; this->row_ = i; this->col_ = j;}
106 }
static bool isFinite(Type const &x)

References STK::hidden::EltVisitor2DBase< Type >::col_, STK::hidden::EltVisitor2DBase< Type >::res_, and STK::hidden::EltVisitor2DBase< Type >::row_.


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