Evoplex  0.2.1
Public Member Functions | Protected Member Functions | Friends | List of all members
evoplex::AbstractModel Class Reference

Abstract base class for model plugins. More...

#include <abstractmodel.h>

Inheritance diagram for evoplex::AbstractModel:
evoplex::AbstractModelInterface evoplex::AbstractPlugin

Public Member Functions

const QString & graphId () const
 Gets the graph id.
 
AbstractGraphgraph () const
 Gets the pointer to the current graph.
 
int step () const
 Gets the current time step.
 
int lastStep () const
 Gets the end time step (stopAt).
 
const Nodesnodes () const
 Gets the nodes. More...
 
Node node (int nodeId) const
 Gets the Node corresponding to nodeId. More...
 
const Edgesedges () const
 Gets the edges. More...
 
const Edgeedge (int edgeId) const
 Returns the Edge corresponding to edgeId. More...
 
const Edgeedge (int originId, int neighbourId) const
 Returns the Edge that connects originId to neighbourId. More...
 
void beforeLoop () override
 It is executed before the algorithmStep() loop. More...
 
void afterLoop () override
 It is executed after the algorithmStep() loop ends. More...
 
Values customOutputs (const Values &inputs) const override
 Allows implementing custom outputs for the model plugin. More...
 
- Public Member Functions inherited from evoplex::AbstractModelInterface
virtual ~AbstractModelInterface ()=default
 Provide a default destructor to keep compilers happy.
 
virtual bool algorithmStep ()=0
 It is executed in a loop and must contain all the logic to perform ONE step. More...
 
virtual bool init ()
 Initializes the plugin. More...
 
- Public Member Functions inherited from evoplex::AbstractPlugin
virtual bool init ()
 Initializes the plugin. More...
 
PRGprg () const
 pseudo-random generator pointer. More...
 
PRGrand () const
 prg() alias More...
 
const Attributesattrs () const
 Gets the plugin's attributes.
 
const QString & attrName (int attrId) const
 Gets the attribute's name for attrId. More...
 
const Valueattr (int attrId) const
 Gets the attribute's value for attrId. More...
 
Value attr (const QString &name, Value defaultValue=Value()) const
 Gets the value of the attribute name. More...
 
bool attrExists (const char *name) const
 Checks if the plugin's attribute name exists. More...
 
bool attrExists (const QString &name) const
 Checks if the plugin's attribute name exists. More...
 

Protected Member Functions

 AbstractModel ()=default
 constructor
 
- Protected Member Functions inherited from evoplex::AbstractPlugin
 AbstractPlugin ()=default
 constructor
 
 ~AbstractPlugin ()=default
 destructor
 

Friends

class Trial
 

Additional Inherited Members

- Protected Attributes inherited from evoplex::AbstractPlugin
Trial * m_trial
 

Detailed Description

Abstract base class for model plugins.


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