STK++ 0.9.13
tutoAccessors2.cpp
Go to the documentation of this file.
1#include "STKpp.h"
2using namespace STK;
3int main(int argc, char** argv)
4{
5 ArrayXX t(5, 5); // array of size 5x5
6 for (int i=t.beginRows(); i<t.endRows(); i++)
7 {
8 PointX r(t.row(i), true); // create a reference on the i-th row of t
9 // fill the i-th row of t with the number i
10 r= i; // same as for (int j=r.begin(); j<r.end(); j++) { r[j] = i;}
11 }
12 std::cout << "t =\n" << t;
13 return 0;
14}
This file include all the header files of the STK++ project.
int beginRows() const
int endRows() const
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.
int main(int argc, char **argv)