NeuroLab
Time Class Reference

The time. More...

Inheritance diagram for Time:

Public Member Functions

 Time (double timestep)
 Create time.
 
virtual ~Time ()
 Destroy time.
 
virtual string getPhysicalDescription ()
 Return physick description.
 
void run (double startTime, double endTime, ostream &log=cout, bool init=true)
 Run simulation for all attached objects. More...
 
void run (unsigned long long steps, ostream &log=cout, bool init=true)
 Run simulation for all attached objects. More...
 
void run (unsigned long long events, class StochasticEventGenerator *eventSource, unsigned long long maxSteps, ostream &log=cout, bool init=true)
 Run simulation for all attached objects. More...
 
void runNested (unsigned long long steps, unsigned long long runs, DataCollector *runRecorder, ostream &log=cout)
 Run multiple simulations for all attached objects. More...
 
void runNested (unsigned long long events, class StochasticEventGenerator *eventSource, unsigned long long maxSteps, unsigned long long runs, DataCollector *runRecorder, ostream &log=cout)
 Run multiple simulations for all attached objects. More...
 
void add (class TimeDependent *object)
 Attach an object.
 
void add (class Estimator *object)
 Attach an object.
 
void remove (class TimeDependent *object)
 Detach an object.
 
void remove (class Estimator *object)
 Detach an object.
 
- Public Member Functions inherited from Physical
 Physical ()
 Construct.
 
 Physical (const Physical &)
 Copy.
 
 Physical (string name)
 Construct.
 
 Physical (string name, string unitPrefix, string unitSymbol)
 Construct.
 
 Physical (string name, Unit unit)
 Construct.
 
virtual string getDescription ()
 Retrive the physical name. More...
 
virtual string getUnitName ()
 Returns the unit name.
 
virtual string getUnitSymbol ()
 Returns the unit name.
 
virtual void setDescription (string name)
 Set the name. More...
 
virtual void setPhysicalDescription (string name)
 Set the name. Same as setDescription(). More...
 
virtual void setUnit (Unit u)
 Set the unit.
 
virtual void setUnitPrefix (int n)
 Set unit prefix. More...
 
virtual Unit getUnit () const
 Retrieve the unit.
 

Detailed Description

The time.

This class is responsable for governing the simulation progress.

Member Function Documentation

void Time::run ( double  startTime,
double  endTime,
ostream &  log = cout,
bool  init = true 
)

Run simulation for all attached objects.

Runs a simulation from a start time to an end time.

Parameters
startTimetime value to start witch
endTimetime value to stop at
logstream for progress messages
initinclude initialising of all dependent objects
void Time::run ( unsigned long long  steps,
ostream &  log = cout,
bool  init = true 
)

Run simulation for all attached objects.

Runs a simulation for a certain number of time steps. This function does not reset the Time::timePassed value before start.

Parameters
stepsnumber of time steps to run
logstream for progress messages
initinclude initialising of all dependent objects
void Time::run ( unsigned long long  events,
class StochasticEventGenerator eventSource,
unsigned long long  maxSteps,
ostream &  log = cout,
bool  init = true 
)

Run simulation for all attached objects.

Runs a simulation for a certain number of events (e.g. spikes from a neuron). As a safeguard a maximum number of time steps must be given, in case the event source fails to deliver events. This function does not reset the Time::timePassed value before start.

Parameters
eventsnumber of events until run is finished
eventSourceevent source
maxStepsmaximum number of time steps, should the event source fail
logstream for progress messages
initinclude initialising of all dependent objects
void Time::runNested ( unsigned long long  steps,
unsigned long long  runs,
DataCollector runRecorder,
ostream &  log = cout 
)

Run multiple simulations for all attached objects.

Runs a number of simulations for a certain number of time steps.

Parameters
stepsnumber of time stepsfor each run
runsnumber of time runs
runRecorderobject with functions to execute at beginning/end of each run
logstream for progress messages
void Time::runNested ( unsigned long long  events,
class StochasticEventGenerator eventSource,
unsigned long long  maxSteps,
unsigned long long  runs,
DataCollector runRecorder,
ostream &  log = cout 
)

Run multiple simulations for all attached objects.

Runs a number of simulations for a certain number of time steps.

Parameters
eventsnumber of events until run is finished
eventSourceevent source
maxStepsmaximum number of time steps, should the event source fail
runsnumber of time runs
runRecorderobject with functions to execute at beginning/end of each run
logstream for progress messages