Evoplex  0.2.1
Functions
Base Model

Groups all the base fuctions available for any model plugin. More...

Functions

const QString & evoplex::AbstractModel::graphId () const
 Gets the graph id.
 
AbstractGraphevoplex::AbstractModel::graph () const
 Gets the pointer to the current graph.
 
int evoplex::AbstractModel::step () const
 Gets the current time step.
 
int evoplex::AbstractModel::lastStep () const
 Gets the end time step (stopAt).
 
const Nodesevoplex::AbstractModel::nodes () const
 Gets the nodes. More...
 
Node evoplex::AbstractModel::node (int nodeId) const
 Gets the Node corresponding to nodeId. More...
 
const Edgesevoplex::AbstractModel::edges () const
 Gets the edges. More...
 
const Edgeevoplex::AbstractModel::edge (int edgeId) const
 Returns the Edge corresponding to edgeId. More...
 
const Edgeevoplex::AbstractModel::edge (int originId, int neighbourId) const
 Returns the Edge that connects originId to neighbourId. More...
 
void evoplex::AbstractModel::beforeLoop () override
 It is executed before the algorithmStep() loop. More...
 
void evoplex::AbstractModel::afterLoop () override
 It is executed after the algorithmStep() loop ends. More...
 
Values evoplex::AbstractModel::customOutputs (const Values &inputs) const override
 Allows implementing custom outputs for the model plugin. More...
 

Detailed Description

Groups all the base fuctions available for any model plugin.

For more information: https://evoplex.org/docs/creating-plugins

See also
AbstractPlugin, AbstractGraph, AbstractModel

Function Documentation

◆ afterLoop()

void evoplex::AbstractModel::afterLoop ( )
inlineoverridevirtual

It is executed after the algorithmStep() loop ends.

The default implementation of this function does nothing.

Implements evoplex::AbstractModelInterface.

◆ beforeLoop()

void evoplex::AbstractModel::beforeLoop ( )
inlineoverridevirtual

It is executed before the algorithmStep() loop.

The default implementation of this function does nothing.

Implements evoplex::AbstractModelInterface.

◆ customOutputs()

Values evoplex::AbstractModel::customOutputs ( const Values &  inputs) const
inlineoverridevirtual

Allows implementing custom outputs for the model plugin.

A "custom output" can be plotted or stored in a file through Evoplex. The inputs must be defined in the metadata.json file. If an experiment requests some custom output, this function will be called once at each time step, receiving the requested inputs. The default implementation of this function does nothing.

Returns
the Value output for each of the inputs

Implements evoplex::AbstractModelInterface.

◆ edge() [1/2]

const Edge & evoplex::AbstractModel::edge ( int  edgeId) const
inline

Returns the Edge corresponding to edgeId.

Parameters
edgeIdA valid edge id.
Exceptions
std::out_of_rangeif no such data is present.

◆ edge() [2/2]

const Edge & evoplex::AbstractModel::edge ( int  originId,
int  neighbourId 
) const
inline

Returns the Edge that connects originId to neighbourId.

Parameters
originIdA valid node id.
neighbourIdA valid node id.
Exceptions
std::out_of_rangeif no such data is present.

◆ edges()

const Edges & evoplex::AbstractModel::edges ( ) const
inline

Gets the edges.

◆ node()

Node evoplex::AbstractModel::node ( int  nodeId) const
inline

Gets the Node corresponding to nodeId.

Parameters
nodeIdA valid node id.
Exceptions
std::out_of_rangeif no such data is present.

◆ nodes()

const Nodes & evoplex::AbstractModel::nodes ( ) const
inline

Gets the nodes.