STK++ 0.9.13
tutoSubArrays.cpp
Go to the documentation of this file.
1#include "STKpp.h"
2using namespace STK;
3int main(int argc, char** argv)
4{
5 VectorX b(3, 0);
6 std::cout << "b=\n" << b;
7 b.sub(Range(2)) = 1.;
8 std::cout << "b=\n" << b << "\n";
9 ArrayXX a(3, 4); a << 1.,2.,3.,4.
10 , 1.,2.,3.,4.
11 , 1.,1.,1.,1.;
12 std::cout << "a=\n" << a;
13 a.col(1) = b;
14 a.row(1, Range(2,2)) = 0.;
15 a.sub(Range(1,2), Range(2,2)) = 9.;
16 std::cout << "a=\n" << a;
17 return 0;
18}
This file include all the header files of the STK++ project.
SubVector sub(Range const &J) const
Col col(int j) const
access to a part of a column.
Row row(int i) const
access to a part of a row.
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)