Sampling Class Reference

Class to generate a sample set. More...

#include <sampling.h>

List of all members.

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.

Detailed Description

Class to generate a sample set.

Parameters:
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.


Constructor & Destructor Documentation

Sampling::Sampling ( Pointer< Param param = NULL,
char *  param_prefix = NULL 
)

(Default-)Constructor.

Parameters:
param Parameters.
param_prefix A prefix for the parameter names.
virtual Sampling::~Sampling (  )  [inline, virtual]

Destructor.

Does nothing.

Definition at line 75 of file sampling.h.


Member Function Documentation

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.

Parameters:
sample_set The sample set to add the points to.
lower Lower bounds of variables.
upper Upper bounds of variables.
Returns:
The number of added sample points.
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.

Parameters:
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.

Parameters:
lower Lower bounds of variables.
upper Upper bounds of variables.
block A block structure.
Returns:
The computed sample set.

Definition at line 102 of file sampling.h.

virtual void Sampling::print ( ostream &  out  )  const [inline, virtual]

Prints parameters.

Parameters:
out The ostream to print to.

Definition at line 111 of file sampling.h.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const Sampling s 
) [friend]

Output operator.

Calls cr.print(out).

Parameters:
out The ostream to print to.
cr The Relax to print.
Returns:
out

Definition at line 46 of file sampling.h.


Member Data Documentation

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.


The documentation for this class was generated from the following file:

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1