#include <iso_flock_statistics_behavior.h>
Inherits iso::flock::SwarmBehavior.
Inheritance diagram for iso::flock::StatisticsBehavior:
Public Member Functions | |
StatisticsBehavior (const base::String &pInputSwarmParameterString, const base::String &pInputAgentParameterString, const base::String &pOutputSwarmParameterString, const base::String &pOutputAgentParameterString) | |
create swarm behavior | |
StatisticsBehavior (Swarm *pSwarm, const base::String &pSwarmBehaviorName, const base::String &pInputSwarmParameterString, const base::String &pInputAgentParameterString, const base::String &pOutputSwarmParameterString, const base::String &pOutputAgentParameterString) throw (FlockException) | |
create swarm behavior | |
~StatisticsBehavior () | |
destructor | |
virtual Behavior * | create (const base::String &pBehaviorName, Agent *pSwarm) const throw (FlockException) |
create copy of behavior | |
virtual Behavior * | create (const base::String &pInputSwarmParameterString, const base::String &pInputAgentParameterString, const base::String &pOutputSwarmParameterString, const base::String &pOutputAgentParameterString) const |
create copy of behavior | |
void | act () |
perform behavior | |
Protected Attributes | |
Parameter * | mInputPar |
Parameter * | mMinPar |
input parameter | |
Parameter * | mMaxPar |
minimum value parameter (internal) | |
Parameter * | mAvgPar |
maximum value parameter (internal) | |
Parameter * | mStdDevPar |
average value parameter (internal) | |
unsigned int | mInputParIndex |
standard deviation parameter (internal) | |
Vector< float > | mSquareSum |
input parameter index |
A swarm behavior that conducts a very simple statistical analysis on the values of an agent input parameter and stores the result in internal parameters
The statistical output includes: minimum parameter value, maximum parameter value, average parameter value, standard deviation of agent parameters Input Parameter:
type: InputParameter dim: nD neighbors: ignore
Internal Parameter:
name: xxx_minimum dim: nD defaultValue: na
name: xxx_maximum dim: nD defaultValue: na
name: xxx_average dim: nD defaultValue: na
name: xxx_stdDev dim: nD defaultValue: na
Created by Daniel Bisig on 8/1/08.
StatisticsBehavior::StatisticsBehavior | ( | const base::String & | pInputSwarmParameterString, | |
const base::String & | pInputAgentParameterString, | |||
const base::String & | pOutputSwarmParameterString, | |||
const base::String & | pOutputAgentParameterString | |||
) |
create swarm behavior
pInputSwarmParameterString | input swarm parameter string (parameters are space separated) | |
pInputAgentParameterString | input agent parameter string (parameters are space separated) | |
pOutputSwarmParameterString | output swarm parameter string (paramaters are space separated) | |
pOutputAgentParameterString | output agent parameter string (paramaters are space separated) |
StatisticsBehavior::StatisticsBehavior | ( | Swarm * | pSwarm, | |
const base::String & | pSwarmBehaviorName, | |||
const base::String & | pInputSwarmParameterString, | |||
const base::String & | pInputAgentParameterString, | |||
const base::String & | pOutputSwarmParameterString, | |||
const base::String & | pOutputAgentParameterString | |||
) | throw (FlockException) |
create swarm behavior
pSwarm | reference to swarm to which this behavior is added | |
pSwarmBehaviorName | swarm behavior name | |
pInputSwarmParameterString | input swarm parameter string (parameters are space separated) | |
pInputAgentParameterString | input agent parameter string (parameters are space separated) | |
pOutputSwarmParameterString | output swarm parameter string (parameters are space separated) | |
pOutputAgentParameterString | output agent parameter string (parameters are space separated) |
StatisticsBehavior::~StatisticsBehavior | ( | ) |
destructor
Behavior * StatisticsBehavior::create | ( | const base::String & | pBehaviorName, | |
Agent * | pSwarm | |||
) | const throw (FlockException) [virtual] |
create copy of behavior
pBehaviorName | name of behavior | |
pSwarm | swarm this behavior belongs to |
FlockException | wrong number of type of parameters |
Implements iso::flock::SwarmBehavior.
Behavior * StatisticsBehavior::create | ( | const base::String & | pInputSwarmParameterString, | |
const base::String & | pInputAgentParameterString, | |||
const base::String & | pOutputSwarmParameterString, | |||
const base::String & | pOutputAgentParameterString | |||
) | const [virtual] |
create copy of behavior
pInputParameterString | input parameter string | |
pOutputParameterString | output parameter string |
Implements iso::flock::SwarmBehavior.
void StatisticsBehavior::act | ( | ) | [virtual] |
Parameter* iso::flock::StatisticsBehavior::mInputPar [protected] |
Parameter* iso::flock::StatisticsBehavior::mMinPar [protected] |
input parameter
Parameter* iso::flock::StatisticsBehavior::mMaxPar [protected] |
minimum value parameter (internal)
Parameter* iso::flock::StatisticsBehavior::mAvgPar [protected] |
maximum value parameter (internal)
Parameter* iso::flock::StatisticsBehavior::mStdDevPar [protected] |
average value parameter (internal)
unsigned int iso::flock::StatisticsBehavior::mInputParIndex [protected] |
standard deviation parameter (internal)
Vector<float> iso::flock::StatisticsBehavior::mSquareSum [protected] |
input parameter index