STK++ 0.9.13
tutoVisitors.cpp File Reference
#include "STKpp.h"
Include dependency graph for tutoVisitors.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 4 of file tutoVisitors.cpp.

5{
6 CArray22 a;
7 a << 0, 1,
8 2, 3;
9 stk_cout << "a.sum()= " << a.sum() << _T("\n");
10 stk_cout << "a.minElt()= " << a.minElt() << _T("\n");
11 stk_cout << "a.maxElt()= " << a.maxElt() << _T("\n");
12 stk_cout << "(a > 0).count()= " << (a > 0).count() << _T("\n");
13 stk_cout << "(a > 0).all()= " << (a > 0).all() << _T("\n");
14 stk_cout << "(a > 0).any()= " << (a > 0).any() << _T("\n");
15 int i,j;
16 stk_cout << "a.minElt(i,j)= " << a.minElt(i,j) << _T("\n");
17 stk_cout << "i= " << i << ", j= " << j << _T("\n");
18 return 0;
19}
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
A CArray is a two dimensional array with a continuous storage like a C-array.
Definition STK_CArray.h:130
Type const sum() const
Type const maxElt(int &row, int &col) const
Type const minElt(int &row, int &col) const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
hidden::SliceVisitorSelector< Derived, hidden::CountVisitor, Arrays::by_col_ >::type_result count(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual count value of the ve...
hidden::SliceVisitorSelector< Derived, hidden::AnyVisitor, Arrays::by_col_ >::type_result any(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual visitor value of the ...
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...

References _T, STK::all(), STK::any(), STK::count(), STK::ExprBase< Derived >::maxElt(), STK::ExprBase< Derived >::minElt(), stk_cout, and STK::ExprBase< Derived >::sum().