CSIM: Forceable Class Reference

Forceable Class Reference

#include <forceable.h>

Inheritance diagram for Forceable:

Advancable csimClass Neuron AnalogNeuron SpikingNeuron AnalogInputNeuron LinearNeuron SigmoidalNeuron CbNeuron IfbNeuron Izhi_Neuron LifBurstNeuron LifNeuron SpikingInputNeuron List of all members.

Detailed Description

Base class for all objects we can be forced (by some teacher; see class Teacher) to produce a given target output.

Forcing an object To be able to teach/force an object in a proper way we decided to split the two steps (calculate next state and output the result) which are usually done within the advance() method into two explicit pieces: the class Forceable introduces the two methods nextstate() and output() which represent this two steps. In addition the method force() allows a potential teacher (see class Teacher) to intervene and to force the object to give a certain output.

Implementing foreable objects Each object derived from Forceable must implement the three methods nextstate(), force() and output(). One must not implement advance()! This is hardcoded as a call to nextstate(); directly followd by output(). nextstate() shoud perform the usual numeric calculations/integration. It should store the result for further usage by output(). The call to output() should then propagate the results to the outgoing objects.

Active teacher If teacher forcing is active a teacher will call force() between the calls to nextstate() and output() and is thus able to force acertain output (and also to overwrite any results computed by advance()). However for efficiency reasons it is left to the teacher if a call to nextstate() is necessary at all (since the result may be overwritten) and it may well be the case the during simulations with an active teacher nextstate() does not get called.

Inactive teacher During each simulation step advance() gets called which in turn calls nextstate() and output.

See also:
Teacher, SpikingTeacher, AnalogTeacher, SpikingSRCTeacher

Public Member Functions

  • Forceable (void)
    The constructor ...
  • virtual double nextstate (void)=0
    Calculate the next state of the object but do not send it to outgoing objects.
  • virtual void force (double y)=0
    Allows some teacher to force a certain output or to overwrite what was computed during the call of nextstate().
  • virtual void output (void)=0
    W call to output should actually promotes the output (actual or teacher) to the outgoing objects.
  • int advance (void)
    Advance of forcable objects is the sequence: nextstate(); output(); return 1;.
  • virtual int addIncoming (Advancable *potentialTeacher)
    If potentialTeacher is actually a teach then we will store that pointer (in myTeacher).

Public Attributes


 
(C) 2003, Thomas Natschläger last modified 07/10/2006