iso::flock::EnvParameter Class Reference

#include <iso_flock_env_parameter.h>

Inherits iso::flock::Parameter.

Inheritance diagram for iso::flock::EnvParameter:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EnvParameter (Env *pEnv, const base::String &pName, unsigned int pValueDim, const math::Vector< unsigned int > &pSubdivisionCount, const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos)
 create environment parameter
 EnvParameter (Env *pEnv, const base::String &pName, const math::Vector< real > &pValues, const math::Vector< unsigned int > &pSubdivisionCount, const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos)
 create environment parameter
 EnvParameter (Env *pEnv, space::Space *pGridSpace, unsigned int pValueDim) throw (FlockException)
 create environment parameter
 EnvParameter (Env *pEnv, EnvParameter &pParameter)
 copy constructor
 ~EnvParameter ()
 destructor
unsigned int gridDim () const
 return parameter grid dimension
const math::Vector< unsigned
int > & 
gridSize () const
 return parameter grid size
unsigned int valueDim () const
 return parameter value dimension
const Vector< real > & minPos () const
 return minimum position
const Vector< real > & maxPos () const
 return maximum position
space::SpaceGrid & grid ()
 return environment parameter grid
space::SpaceGrid & backupGrid ()
 return environment parameter grid
space::Space & space ()
 return environment space
void set (real pValue)
 set values
void set (const math::Vector< real > &pValues) throw (FlockException)
 set parameter values
void set (const math::VectorField< real > &pValues) throw (FlockException)
 set parameter values
void set (const math::Vector< real > &pPosition, const math::Vector< real > &pValues, space::GridValueSetMode pSetMode) throw (FlockException)
 set parameter values
void change (const math::Vector< real > &pValues) throw (FlockException)
 change parameter values
void change (const math::Vector< real > &pPosition, const math::Vector< real > &pValues, space::GridValueSetMode pSetMode) throw (FlockException)
 change parameter values
virtual void randomize (real pMinParameterValue, real pMaxParameterValue)
 randomize parameter value
virtual void randomize (const math::Vector< real > &pMinParameterValues, const math::Vector< real > &pMaxParameterValues) throw (FlockException)
 randomize parameter value
virtual void randomize (real pMinParameterValue, real pMaxParameterValue, real pThresholdValue)
 randomize parameter value
virtual void randomize (const math::Vector< real > &pMinParameterValues, const math::Vector< real > &pMaxParameterValues, const math::Vector< real > &pThresholdValues) throw (FlockException)
 randomize parameter value
void flush ()
 copy backup value into current value
void spaceObjects (QVector< SpaceObject * > &pEnvObjects)
 return vector of space objects
virtual base::String info (int pPropagationLevel=0) const
 print parameter information

Protected Member Functions

 EnvParameter ()
 default constructor

Protected Attributes

space::SpaceGrid * mValueGrid
space::SpaceGrid * mBackupValueGrid
 value grid
space::GridAlg * mGridAlg
 backup value grid;
space::Space * mGridSpace

Friends

std::ostream & operator<< (std::ostream &pOstream, const EnvParameter &pParameter)
 retrieve textual parameter info

Constructor & Destructor Documentation

EnvParameter::EnvParameter ( Env pEnv,
const base::String &  pName,
unsigned int  pValueDim,
const math::Vector< unsigned int > &  pSubdivisionCount,
const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
)

create environment parameter

Parameters:
pEnv environment this parameter belongs to
pName name of environment parameter
pValueDim dimension of parameter value
pSubdivisionCount grid subdivision of parameter value
pMinPos minimum position of parameter value grid
pMaxPos maximum position of parameter value grid

EnvParameter::EnvParameter ( Env pEnv,
const base::String &  pName,
const math::Vector< real > &  pValues,
const math::Vector< unsigned int > &  pSubdivisionCount,
const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
)

create environment parameter

Parameters:
pEnv environment this parameter belongs to
pName name of environment parameter
pValues environment parameter value values
pSubdivisionCount grid subdivision of parameter value
pMinPos minimum position of parameter value grid
pMaxPos maximum position of parameter value grid

EnvParameter::EnvParameter ( Env pEnv,
space::Space *  pGridSpace,
unsigned int  pValueDim 
) throw (FlockException)

create environment parameter

Parameters:
pEnv environment this parameter belongs to
pGridSpace grid space
pValueDim dimension of parameter value
Exceptions:
FlockException space does not contain a grid or valuedim of grid does not match specified value

EnvParameter::EnvParameter ( Env pEnv,
EnvParameter pParameter 
)

copy constructor

Parameters:
pEnv env this parameter belongs to
pParameter parameter to copy

EnvParameter::~EnvParameter (  ) 

destructor

EnvParameter::EnvParameter (  )  [protected]

default constructor


Member Function Documentation

unsigned int EnvParameter::gridDim (  )  const

return parameter grid dimension

Returns:
parameter grid dimension

const math::Vector< unsigned int > & EnvParameter::gridSize (  )  const

return parameter grid size

Returns:
parameter grid size

unsigned int EnvParameter::valueDim (  )  const

return parameter value dimension

Returns:
parameter value dimension

const Vector< flock::real > & EnvParameter::minPos (  )  const

return minimum position

Returns:
minimum position

const Vector< flock::real > & EnvParameter::maxPos (  )  const

return maximum position

Returns:
maximum position

space::SpaceGrid & EnvParameter::grid (  ) 

return environment parameter grid

Returns:
environment parameter grid

space::SpaceGrid & EnvParameter::backupGrid (  ) 

return environment parameter grid

Returns:
environment parameter grid

space::Space & EnvParameter::space (  ) 

return environment space

Returns:
environment space

void EnvParameter::set ( real  pValue  )  [virtual]

set values

Parameters:
pValue single value

Reimplemented from iso::flock::Parameter.

void EnvParameter::set ( const math::Vector< real > &  pValues  )  throw (FlockException)

set parameter values

Parameters:
pValues parameter values
set entire parameter value grid to same value

void EnvParameter::set ( const math::VectorField< real > &  pValues  )  throw (FlockException)

set parameter values

Parameters:
pValues parameter values
Exceptions:
failed to set values

void EnvParameter::set ( const math::Vector< real > &  pPosition,
const math::Vector< real > &  pValues,
space::GridValueSetMode  pSetMode 
) throw (FlockException)

set parameter values

Parameters:
pPosition position
pValues parameter values
pSetMode set mode
set parameter value grid at specified position

void EnvParameter::change ( const math::Vector< real > &  pValues  )  throw (FlockException)

change parameter values

Parameters:
pValues parameter values
change entire parameter value grid by same value

void EnvParameter::change ( const math::Vector< real > &  pPosition,
const math::Vector< real > &  pValues,
space::GridValueSetMode  pSetMode 
) throw (FlockException)

change parameter values

Parameters:
pPosition position
pValues parameter values
pSetMode set mode
change parameter value grid at specified position

void EnvParameter::randomize ( real  pMinParameterValue,
real  pMaxParameterValue 
) [virtual]

randomize parameter value

Parameters:
pMinParameterValue minimum parameter value
pMaxParameterValue minimum parameter value

Reimplemented from iso::flock::Parameter.

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

randomize parameter value

Parameters:
pMinParameterValues minimum parameter values
pMaxParameterValues minimum parameter values

Reimplemented from iso::flock::Parameter.

void EnvParameter::randomize ( real  pMinParameterValue,
real  pMaxParameterValue,
real  pThresholdValue 
) [virtual]

randomize parameter value

Parameters:
pMinParameterValue minimum parameter value
pMaxParameterValue minimum parameter value
pThresholdValue threshold value
salt and pepper randomization parameter value will be set to min value for random values below threshold and to max value for random values above threshold

void EnvParameter::randomize ( const math::Vector< real > &  pMinParameterValues,
const math::Vector< real > &  pMaxParameterValues,
const math::Vector< real > &  pThresholdValues 
) throw (FlockException) [virtual]

randomize parameter value

Parameters:
pMinParameterValues minimum parameter values
pMaxParameterValues minimum parameter values
pThresholdValues threshold values
salt and pepper randomization parameter value will be set to min value for random values below threshold and to max value for random values above threshold

void EnvParameter::flush (  )  [virtual]

copy backup value into current value

Reimplemented from iso::flock::Parameter.

void EnvParameter::spaceObjects ( QVector< SpaceObject * > &  pEnvObjects  ) 

return vector of space objects

Parameters:
pEnvObjects vector of space objects
returns space objects that exist within the boundaries of the environment grid

base::String EnvParameter::info ( int  pPropagationLevel = 0  )  const [virtual]

print parameter information

Parameters:
pPropagationLevel how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding)

Reimplemented from iso::flock::Parameter.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const EnvParameter pParameter 
) [friend]

retrieve textual parameter info

Parameters:
pOstream output text stream
pParameter parameter


Member Data Documentation

space::SpaceGrid* iso::flock::EnvParameter::mValueGrid [protected]

space::SpaceGrid* iso::flock::EnvParameter::mBackupValueGrid [protected]

value grid

space::GridAlg* iso::flock::EnvParameter::mGridAlg [protected]

backup value grid;

space::Space* iso::flock::EnvParameter::mGridSpace [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