STK++ 0.9.13
tutoAppliers.cpp
Go to the documentation of this file.
1#include "STKpp.h"
2using namespace STK;
4int main(int argc, char** argv)
5{
6 CArray2X a(2, 5);
7 stk_cout << "a.randUnif() =\n" << a.randUnif();
8 stk_cout << "a.randGauss()=\n" << a.randGauss();
9 Law::Gamma law(1, 1.5);
10 stk_cout << "a.rand(law) =\n" << a.rand(law);
11 stk_cout << "a.setValue(1)=\n" << a.setValue(1);
12 stk_cout << "a+=2 =\n" << (a+=2);
13 stk_cout << "a*=2 =\n" << (a*=2);
14 stk_cout << "a/=2 =\n" << (a/=2);
15 stk_cout << "a-=2 =\n" << (a-=2);
16 return 0;
17}
#define stk_cout
Standard stk output stream.
This file include all the header files of the STK++ project.
Derived & setValue(TypeConst value)
set a value to this container.
Derived & randUnif()
set random values to this using a uniform law.
Derived & randGauss()
set random values to this using a standard gaussian law.
Derived & rand(Law::IUnivLaw< Type > const &law)
set random values to this using a distribution law given by the user.
A CArray is a two dimensional array with a continuous storage like a C-array.
Definition STK_CArray.h:130
Gamma distribution law.
The namespace STK is the main domain space of the Statistical ToolKit project.
int main(int argc, char **argv)