Construct version 5.4.4
An agent based modeling framework
Output Class Referenceabstract

Base class for Construct output. More...

Inheritance diagram for Output:

Public Member Functions

 Output (const dynet::ParameterMap &params, Construct &construct)
 Sets up the output to only record during certain timeperiods. Allows the usage of should_process.
 
 Output ()
 Creates an output that does not depend on time. Output::should_process should not be called when using this constructor.
 
bool should_process (int t)
 Given the current time index, returns true if the current time period is flagged to be processed.
 
virtual ~Output ()
 Virtual Deconstructor. More...
 
virtual std::vector< int > get_output_timeperiods (const dynet::ParameterMap &params, Construct &construct)
 Creates a vector of indexes that indicate in which timeperiod output should be processed. The parameter "timeperiods" in params controls this value. "all" will fill the entire the array with -1 followed by all timeperiods. "last" will set it to only contain the last time index. "initial" will set it to only contain -1. If it is none of these, the param is tokenized with a comma delimiter and converts the tokens to integers. Returned vector should always be ordered.
 
virtual void process (unsigned int t)=0
 Called after each model has executed. More...
 

Detailed Description

Base class for Construct output.

Constructor & Destructor Documentation

◆ ~Output()

virtual Output::~Output ( )
inlinevirtual

Virtual Deconstructor.

Deconstructor is virtual so that when an Output is deallocated by the OutputManager, the derived output's deconstructor is also called. This virtual deconstructor preforms no operations.

Member Function Documentation

◆ process()

virtual void Output::process ( unsigned int  t)
pure virtual

Called after each model has executed.

Parameters
tThe current time period.

Implemented in Output_Reddit_Posts, Output_Graph, Output_dynetml, and Output_Messages.