STK++ 0.9.13
tutoReferenceAndMove.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 PointX m;
16 m.move(Stat::mean(a));
17 std::cout << "m= " << m;
18 return 0;
19}
This file include all the header files of the STK++ project.
SubVector sub(Range const &J) const
Derived & move(Derived const &T)
move T to this.
Index sub-vector region: Specialization when the size is unknown.
Definition STK_Range.h:265
hidden::FunctorTraits< Derived, MeanOp >::Row mean(Derived const &A)
Compute the mean(s) value(s) of A.
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)