DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
dtree::ConstStateEvaluator< T > Class Template Reference

A templated class that evaluates constant-valued variable. More...

#include <commonstateevaluators.h>

Inheritance diagram for dtree::ConstStateEvaluator< T >:
dtree::StateEvaluator

Public Member Functions

 ConstStateEvaluator (const T &var)
 
double evaluate (int, Vessel *) const
 evaluate the state/variable, and returns the selected output, as double. Client can decide what to do with the value, for example, it can round it and use it as an index to select the proper output in a node. It is a client responsibility, in particular, to handle special cases, for example, if the index is outside the range of expected outputs. A decorator class can eventually remap outputs. More...
 
- Public Member Functions inherited from dtree::StateEvaluator
 StateEvaluator ()
 
virtual ~StateEvaluator ()
 

Detailed Description

template<typename T>
class dtree::ConstStateEvaluator< T >

A templated class that evaluates constant-valued variable.

Constructor & Destructor Documentation

◆ ConstStateEvaluator()

template<typename T >
dtree::ConstStateEvaluator< T >::ConstStateEvaluator ( const T &  var)
inline

Member Function Documentation

◆ evaluate()

template<typename T >
double dtree::ConstStateEvaluator< T >::evaluate ( int  tstep,
Vessel vessel 
) const
inlinevirtual

evaluate the state/variable, and returns the selected output, as double. Client can decide what to do with the value, for example, it can round it and use it as an index to select the proper output in a node. It is a client responsibility, in particular, to handle special cases, for example, if the index is outside the range of expected outputs. A decorator class can eventually remap outputs.

  • tstep The current Time Step of the simulation.
  • vessel A pointer for the vessel being evaluated.

Implements dtree::StateEvaluator.


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