iso::flock::Env Class Reference

#include <iso_flock_env.h>

Inherits iso::flock::Agent.

Inheritance diagram for iso::flock::Env:

Inheritance graph
[legend]
Collaboration diagram for iso::flock::Env:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Env (const base::String &pName, unsigned int pDim)
 create environment
 ~Env ()
 destructor
unsigned int dim () const
void addParameter (const base::String &pParameterName, unsigned int pValueDim, const math::Vector< unsigned int > &pSubdivisionCount, const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos) throw (FlockException)
 create parameter
void addParameter (const base::String &pParameterName, const math::Vector< real > &pValues, const math::Vector< unsigned int > &pSubdivisionCount, const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos) throw (FlockException)
 create parameter
void addParameter (space::Space *pGridSpace, unsigned int pValueDim) throw (FlockException)
 create parameter
void setParameterValues (const base::String &pParameterName, const math::Vector< real > &pValues, const math::Vector< real > &pPosition, space::GridValueSetMode pSetMode) throw (FlockException)
 set parameter values
void changeParameterValues (const base::String &pParameterName, const math::Vector< real > &pValues, const math::Vector< real > &pPosition, space::GridValueSetMode pSetMode) throw (FlockException)
 change parameter values
void set (const base::String &pParameterName, real pParameterValue) throw (FlockException)
 set parameter values
void set (const base::String &pParameterName, const math::Vector< real > &pParameterValues) throw (FlockException)
 set parameter values
void set (const base::String &pParameterName, const math::VectorField< real > &pValues) throw (FlockException)
 set parameter values
void randomize (const base::String &pParameterName, real pMinParameterValue, real pMaxParameterValue) throw (FlockException)
 randomize parameter value
void randomize (const base::String &pParameterName, const math::Vector< real > &pMinParameterValues, const math::Vector< real > &pMaxParameterValues) throw (FlockException)
 randomize parameter values
void randomize (const base::String &pParameterName, real pMinParameterValue, real pMaxParameterValue, real pThresholdValue) throw (FlockException)
 randomize parameter value
void randomize (const base::String &pParameterName, const math::Vector< real > &pMinParameterValues, const math::Vector< real > &pMaxParameterValues, const math::Vector< real > &pThresholdValues) throw (FlockException)
 randomize parameter values

Protected Member Functions

 Env ()
 default constructor

Protected Attributes

unsigned int mDim

Constructor & Destructor Documentation

Env::Env ( const base::String &  pName,
unsigned int  pDim 
)

create environment

Env::~Env (  ) 

destructor

Env::Env (  )  [protected]

default constructor


Member Function Documentation

unsigned int Env::dim (  )  const

void Env::addParameter ( const base::String &  pParameterName,
unsigned int  pValueDim,
const math::Vector< unsigned int > &  pSubdivisionCount,
const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
) throw (FlockException)

create parameter

Parameters:
pParameterName parameter name
pValueDim parameter value dimension
pSubdivisionCount parameter grid value subdivision count
pMinPos paramter grid minimum position
pMaxPos parameter grid maximum position
Exceptions:
failed to add parameter

void Env::addParameter ( const base::String &  pParameterName,
const math::Vector< real > &  pValues,
const math::Vector< unsigned int > &  pSubdivisionCount,
const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
) throw (FlockException)

create parameter

Parameters:
pParameterName parameter name
pValues parameter values
pSubdivisionCount parameter grid value subdivision count
pMinPos paramter grid minimum position
pMaxPos parameter grid maximum position
Exceptions:
failed to add parameter

void Env::addParameter ( space::Space *  pGridSpace,
unsigned int  pValueDim 
) throw (FlockException)

create parameter

Parameters:
pGridSpace grid space
pValueDim parameter value dimension
Exceptions:
failed to add parameter

void Env::setParameterValues ( const base::String &  pParameterName,
const math::Vector< real > &  pValues,
const math::Vector< real > &  pPosition,
space::GridValueSetMode  pSetMode 
) throw (FlockException)

set parameter values

Parameters:
pParameterName parameter name
pValues parameter values
pPosition position of parameter values
pSetMode set mode
Exceptions:
FlockException failed to set parameter

void Env::changeParameterValues ( const base::String &  pParameterName,
const math::Vector< real > &  pValues,
const math::Vector< real > &  pPosition,
space::GridValueSetMode  pSetMode 
) throw (FlockException)

change parameter values

Parameters:
pParameterName parameter name
pValues parameter values
pPosition position of parameter values
pSetMode set mode
Exceptions:
FlockException failed to set parameter

void Env::set ( const base::String &  pParameterName,
real  pParameterValue 
) throw (FlockException) [virtual]

set parameter values

Parameters:
pParameterName parameter name
pParameterValue parameter value
Exceptions:
FlockException parameter name is not found

Reimplemented from iso::flock::Agent.

void Env::set ( const base::String &  pParameterName,
const math::Vector< real > &  pParameterValues 
) throw (FlockException) [virtual]

set parameter values

Parameters:
pParameterName parameter name
pParameterValues parameter values
Exceptions:
FlockException parameter name is not found or parameter values has wrong dimension

Reimplemented from iso::flock::Agent.

void Env::set ( const base::String &  pParameterName,
const math::VectorField< real > &  pValues 
) throw (FlockException)

set parameter values

Parameters:
pParameterName parameter name
pValues parameter values
pPosition position of parameter values
pSetMode set mode
Exceptions:
FlockException failed to set parameter

void Env::randomize ( const base::String &  pParameterName,
real  pMinParameterValue,
real  pMaxParameterValue 
) throw (FlockException) [virtual]

randomize parameter value

Parameters:
pParameterName parameter name
pMinParameterValue minimum parameter value
pMaxParameterValue maximum parameter value
Exceptions:
FlockException parameter name not found

Reimplemented from iso::flock::Agent.

void Env::randomize ( const base::String &  pParameterName,
const math::Vector< real > &  pMinParameterValues,
const math::Vector< real > &  pMaxParameterValues 
) throw (FlockException) [virtual]

randomize parameter values

Parameters:
pParameterName parameter name
pMinParameterValues minimum parameter values
pMaxParameterValues maximum parameter values
Exceptions:
FlockException parameter name not found or parameter values has wrong dimension

Reimplemented from iso::flock::Agent.

void Env::randomize ( const base::String &  pParameterName,
real  pMinParameterValue,
real  pMaxParameterValue,
real  pThresholdValue 
) throw (FlockException)

randomize parameter value

Parameters:
pParameterName parameter name
pMinParameterValue minimum parameter value
pMaxParameterValue maximum parameter value
pThresholdValue threshold value
Exceptions:
FlockException parameter name not found
salt and pepper randomization. If random number between 0.0 and 1.0 is below threshold, the parameter will be set to min value, otherwise it will be set to max value

void Env::randomize ( const base::String &  pParameterName,
const math::Vector< real > &  pMinParameterValues,
const math::Vector< real > &  pMaxParameterValues,
const math::Vector< real > &  pThresholdValues 
) throw (FlockException)

randomize parameter values

Parameters:
pParameterName parameter name
pMinParameterValues minimum parameter values
pMaxParameterValues maximum parameter values
pThresholdValues threshold values
Exceptions:
FlockException parameter name not found or parameter values has wrong dimension
salt and pepper randomization. If random number between 0.0 and 1.0 is below threshold, the parameter will be set to min value, otherwise it will be set to max value


Member Data Documentation

unsigned int iso::flock::Env::mDim [protected]


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 15:28:03 2011 for iso_flock by  doxygen 1.5.1