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

Visitor checking if all the elements of an array are different from zero. More...

#include <STK_Visitors.h>

Public Types

typedef bool Type
 
typedef bool constTypeConst
 

Public Member Functions

 AllVisitor ()
 
void operator() (Type_ const &value, int i, int j)
 
void operator() (Type_ const &value, int i)
 
TypeConst result () const
 

Public Attributes

bool res_
 

Detailed Description

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

Visitor checking if all the elements of an array are different from zero.

For example:

// check if all the elements of A equal to 2
bool f = (A == 2).all()
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
hidden::SliceVisitorSelector< Derived, hidden::AllVisitor, Arrays::by_col_ >::type_result all(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual all value of the vect...
See also
ExprBase::all()

Definition at line 316 of file STK_Visitors.h.

Member Typedef Documentation

◆ Type

template<typename Type_ >
typedef bool STK::hidden::AllVisitor< Type_ >::Type

Definition at line 319 of file STK_Visitors.h.

◆ TypeConst

template<typename Type_ >
typedef bool const& STK::hidden::AllVisitor< Type_ >::TypeConst

Definition at line 320 of file STK_Visitors.h.

Constructor & Destructor Documentation

◆ AllVisitor()

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

Definition at line 321 of file STK_Visitors.h.

321: res_(true) {}

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 324 of file STK_Visitors.h.

325 { res_ &= (value);}

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

◆ operator()() [2/2]

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

Definition at line 322 of file STK_Visitors.h.

323 { res_ &= (value);}

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

◆ result()

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

Definition at line 326 of file STK_Visitors.h.

326{ return res_;}

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

Member Data Documentation

◆ res_


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