iso::flock::TargetParameterBehavior Class Reference

shift the values of an input parameter towards those of a target parameter More...

#include <iso_flock_target_parameter_behavior.h>

Inherits iso::flock::Behavior.

Inheritance diagram for iso::flock::TargetParameterBehavior:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TargetParameterBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create behavior
 TargetParameterBehavior (Agent *pAgent, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString) throw (FlockException)
 create behavior
 ~TargetParameterBehavior ()
 destructor
virtual Behaviorcreate (const base::String &pBehaviorName, Agent *pAgent) const throw (FlockException)
 create copy of behavior
virtual Behaviorcreate (const base::String &pInputParameterString, const base::String &pOutputParameterString) const
 create copy of behavior
void act ()
 perform behavior

Protected Attributes

ParametermInputPar
ParametermOutputPar
 input parameter
ParametermTargetPar
 output parameter
ParametermAdaptPar
 target parameter
ParametermAmountPar
 adapt parameter
ParametermAbsPar
 behavior amount parameter
math::Vector< realmDiffValues
 treat differences as absolute values

Detailed Description

shift the values of an input parameter towards those of a target parameter

values of an input parameter towards those of a target parameter

This behavior shifts the values of an input parameter towards those of a target parameter
The internal adapt parameter controls for each dimension how far the values are shifted: 0: no shift at all, 1: full shift
The internal amount parameter controls for all dimensions how far the values are shifted: 0: no shift at all, 1: full shift
The effect of the amount and adapt parameters is combined
The internal absolute parameter controls is the shiting happens towards absolute or non absolute values

Input Parameter:
type: InputParameter dim: nD neighbors: ignore

Output Parameter:
type: OutputParameter dim: nD neighbors: ignore

Internal Parameter:
name: xxx_target dim: nD defaultValue: 0.0
name: xxx_adapt dim: nD defaultValue: 1.0
name: xxx_amount dim: 1D defaultValue: 0.1
name: xxx_absolute dim: 1D defaultValue: 0.0

Created by Daniel Bisig on 4/21/07.


Constructor & Destructor Documentation

TargetParameterBehavior::TargetParameterBehavior ( const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
)

create behavior

Parameters:
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output paramaters are space separated)

TargetParameterBehavior::TargetParameterBehavior ( Agent pAgent,
const base::String &  pBehaviorName,
const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
) throw (FlockException)

create behavior

Parameters:
pAgent agent this behavior belongs to
pBehaviorName name of behavior
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output paramaters are space separated)
Exceptions:
FlockException wrong number of type of parameters

TargetParameterBehavior::~TargetParameterBehavior (  ) 

destructor


Member Function Documentation

Behavior * TargetParameterBehavior::create ( const base::String &  pBehaviorName,
Agent pAgent 
) const throw (FlockException) [virtual]

create copy of behavior

Parameters:
pAgent agent this behavior belongs to
pBehaviorName name of behavior
Returns:
new behavior
Exceptions:
FlockException wrong number of type of parameters

Implements iso::flock::Behavior.

Behavior * TargetParameterBehavior::create ( const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
) const [virtual]

create copy of behavior

Parameters:
pInputParameterString input parameter string
pOutputParameterString output parameter string
Returns:
new behavior

Implements iso::flock::Behavior.

void TargetParameterBehavior::act (  )  [virtual]

perform behavior

Implements iso::flock::Behavior.


Member Data Documentation

Parameter* iso::flock::TargetParameterBehavior::mInputPar [protected]

Parameter* iso::flock::TargetParameterBehavior::mOutputPar [protected]

input parameter

Parameter* iso::flock::TargetParameterBehavior::mTargetPar [protected]

output parameter

Parameter* iso::flock::TargetParameterBehavior::mAdaptPar [protected]

target parameter

Parameter* iso::flock::TargetParameterBehavior::mAmountPar [protected]

adapt parameter

Parameter* iso::flock::TargetParameterBehavior::mAbsPar [protected]

behavior amount parameter

math::Vector<real> iso::flock::TargetParameterBehavior::mDiffValues [protected]

treat differences as absolute values


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