STK++ 0.9.13
tutoRowsAndCols.cpp File Reference
#include "STKpp.h"
Include dependency graph for tutoRowsAndCols.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 3 of file tutoRowsAndCols.cpp.

4{
5 CArrayXX A(4, 6); CArray2X B(2,4, -1.);
6 A << 1, 2, 3, 4, 1, 2,
7 4, 3, 1, 3, 2, 4,
8 1, 3, 4, 2, 1, 4,
9 2, 3, 1, 4, 3, 2;
10 stk_cout << _T("A =\n") << A;
11 stk_cout << _T("B =\n") << B;
12 A.sub(B.rows(), B.cols()) = B; // copy B in A(0:1,0:3)
13 stk_cout << _T("A =\n") << A;
14 A.row(3,B.cols()) = meanByCol(B); // copy a row-vector in row 3 of A
15 stk_cout << _T("A =\n") << A;
16}
#define stk_cout
Standard stk output stream.
#define _T(x)
Let x unmodified.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
hidden::SliceVisitorSelector< Derived, hidden::MeanVisitor, Arrays::by_col_ >::type_result meanByCol(Derived const &A)

References _T, STK::meanByCol(), STK::ICArray< Derived >::row(), stk_cout, and STK::ICArray< Derived >::sub().