STK++ 0.9.13
tutoReference.cpp
Go to the documentation of this file.
1#include "STKpp.h"
2using namespace STK;
4int main(int argc, char** argv)
5{
6 ArraySquareX a(4); a << 1.,2.,3.,4.
7 , 1.,2.,3.,4.
8 , 1.,1.,1.,1.
9 , 1.,1.,1.,1.;
10 // create a reference
11 ArrayXX b(a.sub(Range(2), Range(3)), true);
12 b = -1.;
13 std::cout << "Modified a=\n" << a << "\n";
14
15 CArray<Real, 3, 4> c; c << 1.,2.,3.,4.
16 , 1.,2.,3.,4.
17 , 1.,1.,1.,1.;
18 // create a reference
19 CVector3 d(c.col(1), true);
20 d = -1.;
21 std::cout << "Modified c=\n" << c;
22 return 0;
23}
This file include all the header files of the STK++ project.
specialization for the vector case.
A CArray is a two dimensional array with a continuous storage like a C-array.
Definition STK_CArray.h:130
SubVector sub(Range const &J) const
hidden::CSlice< Derived, sizeRows_, 1 >::Result col(int j) const
implement the col operator using a reference on the column of the allocator
Index sub-vector region: Specialization when the size is unknown.
Definition STK_Range.h:265
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
Definition STK_Range.h:59
int main(int argc, char **argv)