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

4{
5 ArrayXX A(3, 2), B(3, 3);
6 A << 1, 2, 3, 4, 5, 6; B << 1, 2, 3, 4, 5, 6, 7, 8, 9;
7 stk_cout << _T("B.isRef() = ") << B.isRef() << _T('\n');
8 // merge B with A
9 A.merge(B);
10 stk_cout << _T("A =\n") << A << _T('\n');
11 stk_cout << _T("B.isRef() = ") << B.isRef() << _T('\n');
12 stk_cout << _T("B =\n") << B<< _T('\n');
13 // merge C with A
14 VectorX C(3); C << 4, 5, 6;
15 A.merge(C);
16 stk_cout << _T("A =\n") << A << _T('\n');
17 // B has been invalidate by A.merge(C) and cannot be used anymore
18 // stk_cout << _T("B =\n") << B; produce an error at execution
19 stk_cout << _T("C.isRef() = ") << C.isRef() << _T('\n');
20 stk_cout << _T("C =\n") << C;
21}
#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...

References _T, STK::IArray2D< Derived >::isRef(), STK::IArray2D< Derived >::merge(), and stk_cout.