Stat
Direct Subclass:
Base class for a statistic that can be computed on a GridBasedModel. This class by itself is not usable; see its subclasses for stats that are currently supported.
Constructor Summary
Public Constructor | ||
public |
constructor(conf: object) The constructor of class Stat takes a 'conf' object as argument. |
Member Summary
Public Members | ||
public |
The model to compute the stat on. |
|
public |
Configuration object for the stat, which should not change its value but may be used for logging and debugging options. |
|
public set |
model(M: GridBasedModel) Every stat is linked to a specific model. |
Method Summary
Public Methods | ||
public abstract |
compute() The compute method of the base Stat class throws an error, enforcing that you have to implement this method when you build a new stat class extending this base class. |
Public Constructors
public constructor(conf: object) source
The constructor of class Stat takes a 'conf' object as argument. However, Stats should not really be configurable in the sense that they should always provide an expected output. The 'conf' object is mainly intended to provide an option to configure logging / debugging output. That is not implemented yet.
Params:
Name | Type | Attribute | Description |
conf | object | configuration options for the Stat, which should change nothing about the return value produced by the compute() method but may be used for logging and debugging options. |
Public Members
Public Methods
public abstract compute() source
The compute method of the base Stat class throws an error, enforcing that you have to implement this method when you build a new stat class extending this base class.