Class to generate a sample set. More...
#include <sampling.h>
Public Member Functions | |
Sampling (Pointer< Param > param=NULL, char *param_prefix=NULL) | |
(Default-)Constructor. | |
virtual | ~Sampling () |
Destructor. | |
virtual int | get_points (vector< dvector > &sample_set, const UserVector< double > &lower, const UserVector< double > &upper) |
Adds sample points to a sample set. | |
void | get_points (vector< vector< dvector > > &sample_set, const UserVector< double > &lower, const UserVector< double > &upper, const vector< ivector > &block) |
Adds sample points to a sample set, given a block-structure. | |
Pointer< vector< vector < dvector > > > | get_points (const UserVector< double > &lower, const UserVector< double > &upper, const vector< ivector > &block) |
Gives a sample set. | |
virtual void | print (ostream &out) const |
Prints parameters. | |
Protected Attributes | |
int | montecarlo |
Number of random sample points to generate. | |
int | vertices |
Number of random points at the vertices to generate. | |
bool | midpoint |
Indicates, whether the midpoint should be added. | |
bool | bounds |
Indicates, whether the lower and upper bounds should be added. | |
Friends | |
ostream & | operator<< (ostream &out, const Sampling &s) |
Output operator. |
Class to generate a sample set.
sample | set Monte Carlo options integer $$ default 5 level 1 The number of random points, which are added to the sample set. Works also for unbounded variables. | |
sample | set mid point options 0 or 1 default 1 level 1 If 1, the middle point of the box is added to the sample set. If the box is incomplete, this is not done. | |
sample | set box ends options 0 or 1 default 1 level 1 If 1, the lower and upper bounds of the box are added to the sample set. If the box is incomplete, this is not done. | |
sample | set vertices options integer $$ default 5 level 1 The number of random points, which lie on the vertices. If the box is incomplete, this is not done. |
Definition at line 39 of file sampling.h.
(Default-)Constructor.
param | Parameters. | |
param_prefix | A prefix for the parameter names. |
virtual Sampling::~Sampling | ( | ) | [inline, virtual] |
virtual int Sampling::get_points | ( | vector< dvector > & | sample_set, | |
const UserVector< double > & | lower, | |||
const UserVector< double > & | upper | |||
) | [virtual] |
Adds sample points to a sample set.
sample_set | The sample set to add the points to. | |
lower | Lower bounds of variables. | |
upper | Upper bounds of variables. |
void Sampling::get_points | ( | vector< vector< dvector > > & | sample_set, | |
const UserVector< double > & | lower, | |||
const UserVector< double > & | upper, | |||
const vector< ivector > & | block | |||
) | [inline] |
Adds sample points to a sample set, given a block-structure.
sample_set | The sample set to add the points to. sample_set.size() must be the number of blocks. | |
lower | Lower bounds of variables. | |
upper | Upper bounds of variables. | |
block | The block structure. |
Definition at line 91 of file sampling.h.
Pointer<vector<vector<dvector> > > Sampling::get_points | ( | const UserVector< double > & | lower, | |
const UserVector< double > & | upper, | |||
const vector< ivector > & | block | |||
) | [inline] |
Gives a sample set.
lower | Lower bounds of variables. | |
upper | Upper bounds of variables. | |
block | A block structure. |
Definition at line 102 of file sampling.h.
virtual void Sampling::print | ( | ostream & | out | ) | const [inline, virtual] |
Prints parameters.
out | The ostream to print to. |
Definition at line 111 of file sampling.h.
ostream& operator<< | ( | ostream & | out, | |
const Sampling & | s | |||
) | [friend] |
Output operator.
Calls cr.print(out).
out | The ostream to print to. | |
cr | The Relax to print. |
Definition at line 46 of file sampling.h.
int Sampling::montecarlo [protected] |
Number of random sample points to generate.
Definition at line 54 of file sampling.h.
int Sampling::vertices [protected] |
Number of random points at the vertices to generate.
Definition at line 57 of file sampling.h.
bool Sampling::midpoint [protected] |
Indicates, whether the midpoint should be added.
Definition at line 60 of file sampling.h.
bool Sampling::bounds [protected] |
Indicates, whether the lower and upper bounds should be added.
Definition at line 63 of file sampling.h.