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

Visitor computing safely the maximal coefficient of the Array. More...

#include <STK_Visitors.h>

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

Public Member Functions

 MaxEltSafeVisitor ()
 
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::MaxEltSafeVisitor< Type >

Visitor computing safely the maximal coefficient of the Array.

See also
ExprBase::maxElt(int, int)

Definition at line 130 of file STK_Visitors.h.

Constructor & Destructor Documentation

◆ MaxEltSafeVisitor()

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

Definition at line 132 of file STK_Visitors.h.

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

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

Member Function Documentation

◆ operator()()

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

Definition at line 134 of file STK_Visitors.h.

135 {
137 if(value > this->res_)
138 { this->res_ = value; this->row_ = i; this->col_ = j;}
139 }
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: