PetaVision  Alpha
 All Data Structures Namespaces Functions Variables
PV::BaseConnection Class Referenceabstract
Inheritance diagram for PV::BaseConnection:
PV::BaseObject PV::HyPerConn PV::CloneConn PV::CopyConn PV::GapConn PV::IdentConn PV::ImprintConn PV::KernelConn PV::MomentumConn PV::PoolingConn PV::privateTransposeConn PV::TransposeConn PV::TransposePoolingConn

BaseConnection Parameters

List of parameters needed from the BaseConnection class

int connId
 
char * preLayerName
 
char * postLayerName
 
HyPerLayerpre
 
HyPerLayerpost
 
ChannelType channel
 
int numAxonalArborLists
 
bool plasticityFlag
 
bool convertRateToSpikeCount
 
bool receiveGpu
 
bool initializeFromCheckpointFlag
 
BaseConnectionProbe ** probes
 
int numProbes
 
bool initInfoCommunicatedFlag
 
bool dataStructuresAllocatedFlag
 
bool initialValuesSetFlag
 
int delayArraySize
 
int * delays
 
float * fDelayArray
 
int getDelayArraySize ()
 
virtual void ioParam_preLayerName (enum ParamsIOFlag ioFlag)
 preLayerName: Specifies the connection's pre layer More...
 
virtual void ioParam_postLayerName (enum ParamsIOFlag ioFlag)
 postLayerName: Specifies the connection's post layer More...
 
virtual void ioParam_channelCode (enum ParamsIOFlag ioFlag)
 channelCode: Specifies which channel in the post layer this connection is attached to More...
 
virtual void ioParam_delay (enum ParamsIOFlag ioFlag)
 delay: Specifies delay(s) which the post layer will receive data More...
 
virtual void ioParam_numAxonalArbors (enum ParamsIOFlag ioFlag)
 numAxonalArbors: Specifies the number of arbors to use in this connection
 
virtual void ioParam_plasticityFlag (enum ParamsIOFlag ioFlag)
 plasticityFlag: Specifies if the weights will update
 
virtual void ioParam_convertRateToSpikeCount (enum ParamsIOFlag ioFlag)
 preActivityIsNotRate: If true, pre activity is spike rate. If false, pre activity is value More...
 
virtual void ioParam_receiveGpu (enum ParamsIOFlag ioFlag)
 receiveGpu: If PetaVision was compiled with GPU acceleration and this flag is set to true, the connection uses the GPU to update the postsynaptic layer's GSyn. If compiled without GPU acceleration, it is an error to set this flag to true.
 
virtual void ioParam_initializeFromCheckpointFlag (enum ParamsIOFlag ioFlag)
 initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol. More...
 
virtual int readStateFromCheckpoint (const char *cpDir, double *timeptr)=0
 
virtual int setInitialValues ()=0
 
virtual bool needUpdate (double time, double dt)=0
 
virtual int initializeDelays (const float *fDelayArray, int size)
 
int initialize_base ()
 
static int decodeChannel (int channel_code, ChannelType *channel_type)
 

Public Member Functions

virtual ~BaseConnection ()
 
virtual int allocateDataStructures ()
 
virtual int checkpointRead (const char *cpDir, double *timeptr)=0
 
virtual int checkpointWrite (const char *cpDir)=0
 
virtual int communicateInitInfo ()
 
virtual int deliver ()=0
 
virtual int finalizeUpdate (double timed, double dt)
 
ChannelType getChannel ()
 
int getConnectionId ()
 
bool getConvertRateToSpikeCount ()
 
bool getDataStructuresAllocatedFlag ()
 
int getDelay (int arbor)
 
bool getInitialValuesSetFlag ()
 
bool getInitInfoCommunicatedFlag ()
 
char const * getKeyword () const
 
char const * getName () const
 
int getNumProbes ()
 
HyPerColgetParent () const
 
bool getPlasticityFlag ()
 
HyPerLayergetPost ()
 
const char * getPostLayerName ()
 
HyPerLayergetPre ()
 
const char * getPreLayerName ()
 
BaseConnectionProbegetProbe (int i)
 
bool getReceiveGpu ()
 
int initializeState ()
 
virtual int insertProbe (BaseConnectionProbe *p)
 
int ioParams (enum ParamsIOFlag ioFlag)
 
int numberOfAxonalArborLists ()
 
virtual int outputProbeParams ()
 
virtual int outputState (double timed, bool last=false)=0
 
HyPerLayerpostSynapticLayer ()
 
HyPerLayerpreSynapticLayer ()
 
void setDataStructuresAllocatedFlag ()
 
void setInitialValuesSetFlag ()
 
void setInitInfoCommunicatedFlag ()
 
virtual int updateState (double timed, double dt)=0
 
virtual int writeTimers (std::ostream &stream)=0
 

Protected Member Functions

 BaseConnection ()
 
int getPreAndPostLayerNames (const char *name, char **preLayerNamePtr, char **postLayerNamePtr)
 
virtual int handleMissingPreAndPostLayerNames ()
 
int initialize (const char *name, HyPerCol *hc)
 
virtual int ioParamsFillGroup (enum ParamsIOFlag ioFlag)
 
void setChannelType (ChannelType ch)
 
void setConvertRateToSpikeCount (bool convertRateToSpikeCountFlag)
 
void setDelay (int arborId, float delay)
 
int setName (char const *name)
 
void setNumberOfAxonalArborLists (int numArbors)
 
int setParent (HyPerCol *hc)
 
void setPostLayerName (const char *postName)
 
void setPostSynapticLayer (HyPerLayer *post)
 
virtual int setPreAndPostLayerNames ()
 
void setPreLayerName (const char *preName)
 
void setPreSynapticLayer (HyPerLayer *pre)
 
void setReceiveGpu ()
 

Static Protected Member Functions

static int inferPreAndPostFromConnName (const char *name, int rank, char **preLayerNamePtr, char **postLayerNamePtr)
 

Protected Attributes

char * name
 
HyPerColparent
 

Detailed Description

Definition at line 26 of file BaseConnection.hpp.

Constructor & Destructor Documentation

PV::BaseConnection::~BaseConnection ( )
virtual

Destructor for BaseConnection

Definition at line 534 of file BaseConnection.cpp.

PV::BaseConnection::BaseConnection ( )
protected

The constructor implicitly called by derived classes' constructors. It calls initialize_base(), but not initialize().

Note that BaseConnection has no public constructors; only derived classes can be constructed directly.

Definition at line 20 of file BaseConnection.cpp.

Member Function Documentation

int PV::BaseConnection::allocateDataStructures ( )
virtual

allocateDataStructures is used to allocate blocks of memory whose size and arrangement depend on parameters. (For example, HyPerConn allocates weight patches and data patches). After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that allocateDataStructures() cannot be run until other layers'/connections' own allocateDataStructures() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

allocateDataStructures() is typically called by the parent HyPerCol's run() method.

Reimplemented in PV::HyPerConn, PV::CloneConn, PV::PoolingConn, PV::TransposePoolingConn, PV::ImprintConn, PV::TransposeConn, PV::MomentumConn, PV::privateTransposeConn, and PV::GapConn.

Definition at line 468 of file BaseConnection.cpp.

virtual int PV::BaseConnection::checkpointRead ( const char *  cpDir,
double *  timeptr 
)
pure virtual

A pure virtual function for reading the state of the connection from the directory specified in cpDir. On exit, *timeptr is the time at which the checkpoint was written. checkpointRead() should restore the state of the connection completely, so that restarting from a checkpoint is equivalent to having the run continue.

Implemented in PV::TransposeConn, PV::HyPerConn, PV::IdentConn, PV::TransposePoolingConn, PV::CloneConn, PV::PoolingConn, PV::ImprintConn, and PV::MomentumConn.

virtual int PV::BaseConnection::checkpointWrite ( const char *  cpDir)
pure virtual

A pure virtual function for writing the state of the connection to the directory specified in cpDir. checkpointWrite() should save the complete state of the connection, so that restarting from a checkpoint is equivalent to having the run continue.

Implemented in PV::TransposeConn, PV::HyPerConn, PV::IdentConn, PV::TransposePoolingConn, PV::CloneConn, PV::PoolingConn, PV::ImprintConn, and PV::MomentumConn.

int PV::BaseConnection::communicateInitInfo ( )
virtual

communicateInitInfo is used to allow connections and layers to set params and related member variables based on what other layers or connections are doing. (For example, CloneConn sets many parameters the same as its originalConn.) After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that communicateInitInfo() cannot be run until other layers'/connections' own communicateInitInfo() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

communicateInitInfo() is typically called by the parent HyPerCol's run() method.

Reimplemented in PV::HyPerConn, PV::IdentConn, PV::CloneConn, PV::PoolingConn, PV::TransposePoolingConn, PV::PlasticCloneConn, PV::CloneKernelConn, PV::TransposeConn, PV::CopyConn, and PV::privateTransposeConn.

Definition at line 403 of file BaseConnection.cpp.

static int PV::BaseConnection::decodeChannel ( int  channel_code,
ChannelType *  channel_type 
)
inlinestatic

Type-safe method of translating an integer channel_code into an allowed channel type. If channel_code corresponds to a recognized channel type, *channel_type is set accordingly and the function returns successfully. Otherwise, *channel_type is undefined and the function returns PV_FAILURE.

Definition at line 501 of file BaseConnection.hpp.

virtual int PV::BaseConnection::deliver ( )
pure virtual

A pure virtual function for modifying the post-synaptic layer's GSyn buffer based on the connection and the presynaptic activity

Implemented in PV::HyPerConn, and PV::privateTransposeConn.

virtual int PV::BaseConnection::finalizeUpdate ( double  timed,
double  dt 
)
inlinevirtual

A virtual function for performing any necessary updates after the normalizers are called.

Reimplemented in PV::HyPerConn, PV::CloneConn, PV::PoolingConn, PV::TransposeConn, and PV::privateTransposeConn.

Definition at line 150 of file BaseConnection.hpp.

int PV::BaseConnection::getConnectionId ( )
inline

Returns the connection's connId (assigned when added to its parent HyPerCol)

Definition at line 193 of file BaseConnection.hpp.

bool PV::BaseConnection::getDataStructuresAllocatedFlag ( )
inline

Returns true or false, depending on whether communicateInitInfo() has been called successfully.

Definition at line 99 of file BaseConnection.hpp.

int PV::BaseConnection::getDelay ( int  arbor)
inline

Returns the delay (in timesteps) belonging the given arbor.

Definition at line 241 of file BaseConnection.hpp.

bool PV::BaseConnection::getInitialValuesSetFlag ( )
inline

Returns true or false, depending on whether initializeState() has been called successfully.

Definition at line 132 of file BaseConnection.hpp.

bool PV::BaseConnection::getInitInfoCommunicatedFlag ( )
inline

Returns true or false, depending on whether communicateInitInfo() has been called successfully.

Definition at line 70 of file BaseConnection.hpp.

int PV::BaseConnection::getNumProbes ( )
inline

Returns the number of probes that have been attached to this connection

Definition at line 251 of file BaseConnection.hpp.

int PV::BaseConnection::getPreAndPostLayerNames ( const char *  name,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
protected

Sets *preLayerNamePtr and *postLayerNamePtr according to the preLayerName and postLayerName parameters in the parameter group specified by the name and params arguments.

Definition at line 185 of file BaseConnection.cpp.

BaseConnectionProbe* PV::BaseConnection::getProbe ( int  i)
inline

Returns the probe with the indicated position in the list of probes. It does not do sanity checking on the value of i.

Definition at line 257 of file BaseConnection.hpp.

int PV::BaseConnection::handleMissingPreAndPostLayerNames ( )
protectedvirtual

Called by BaseConnection::communicateInitInfo of the params did not set pre- and post- layers.

Reimplemented in PV::FeedbackConn.

Definition at line 125 of file BaseConnection.cpp.

int PV::BaseConnection::inferPreAndPostFromConnName ( const char *  name,
int  rank,
char **  preLayerNamePtr,
char **  postLayerNamePtr 
)
staticprotected

The default behavior of BaseConnection::handleMissingPreAndPostLayerNames. It tries to parse the name argument of the connection in the form "PreLayerToPostLayer". Then "PreLayer" put into *preLayerNamePtr and "PostLayer" is put into *postLayerNamePtr, and PV_SUCCESS is returned. If name does not contain the string "To", or if it contains it in more than one place, then PV_FAILURE is returned and *preLayerNamePtr and *postLayerNamePtr are not changed. rank is the rank of the process under MPI; the root process will print a message to the error stream if the routine fails; non-root process will not. This routine uses malloc to fill *{pre,post}LayerNamePtr, so the routine calling this one is responsible for freeing them.

Definition at line 129 of file BaseConnection.cpp.

int PV::BaseConnection::initialize ( const char *  name,
HyPerCol hc 
)
protected

The initialization routine. It should be called during the initialization routine of any derived class.

It sets the name and parent HyPerCol to the indicated arguments, and calls (via ioParams) the virtual ioParamsFillGroup method, which reads params from the parent HyPerCol's params.

Definition at line 48 of file BaseConnection.cpp.

int PV::BaseConnection::initialize_base ( )
private

Called by the constructor, initialize_base() sets member variables to safe values (e.g. pointers to NULL) and parameters to default values.

Definition at line 24 of file BaseConnection.cpp.

int PV::BaseConnection::initializeDelays ( const float *  fDelayArray,
int  size 
)
protectedvirtual

Allocates the delays array and calls setDelay() for each arbor. fDelayArray is an array of length size, of delays, measured in the same units as the parent HyPerCol's dt.

If size=0, all delays are set to zero. If size=1, all delays are set to fDelayArray[0] If size=numArbors, delays[k] is calculated from fDelayArray[k]. If size is any other value, it is an error.

Reimplemented in PV::privateTransposeConn.

Definition at line 473 of file BaseConnection.cpp.

int PV::BaseConnection::initializeState ( )

initializeState is used to set the initial values of the connection. If the parent HyPerCol's checkpointReadFlag is set, it calls checkpointRead() If not, but the connection's initializeFromCheckpointFlag is set, it calls readStateFromCheckpoint(). If neither of these flags is set, it calls setInitialValues. Note that derived classes must implement the methods checkpointRead(), readStateFromCheckpoint(), and setInitialValues().

After a connection is constructed, it is not properly initialized until communicateInitInfo(), allocateDataStructures(), and initializeState() have been called.

Return values: PV_POSTPONE means that initializeState() cannot be run until other layers'/connections' own initializeState() have been run successfully.

PV_SUCCESS and PV_FAILURE have their usual meanings.

initializeState() is typically called by the parent HyPerCol's run() method.

Definition at line 513 of file BaseConnection.cpp.

int PV::BaseConnection::insertProbe ( BaseConnectionProbe p)
virtual

Adds the given probe to the list of probes.

Reimplemented in PV::HyPerConn.

Definition at line 366 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_channelCode ( enum ParamsIOFlag  ioFlag)
protectedvirtual

channelCode: Specifies which channel in the post layer this connection is attached to

Channels can be -1 for no update, or >= 0 for channel number.
0 is excitatory, 1 is inhibitory

Reimplemented in PV::HyPerConn, and PV::GapConn.

Definition at line 254 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_convertRateToSpikeCount ( enum ParamsIOFlag  ioFlag)
protectedvirtual

preActivityIsNotRate: If true, pre activity is spike rate. If false, pre activity is value

The post synaptic layer needs to interpret pre synaptic activity as a spike rate Other situations interpret as a value. This flag sets either one or the other. convertRateToSpikeCount: If true, presynaptic activity should be converted from a rate to a count.

If this flag is true and the presynaptic layer is not spiking, the activity will be interpreted as a spike rate, and will be converted to a spike count when delivering activity to the postsynaptic GSyn buffer. If this flag is false, activity will not be converted.

Reimplemented in PV::IdentConn.

Definition at line 317 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_delay ( enum ParamsIOFlag  ioFlag)
protectedvirtual

delay: Specifies delay(s) which the post layer will receive data

: Delays are specified in units of dt, but are rounded to be integer multiples of dt. If delay is a scalar, all arbors of the connection have that value of delay. If delay is an array, the length must match the number of arbors and the arbors are assigned the delays sequentially.

Definition at line 277 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_initializeFromCheckpointFlag ( enum ParamsIOFlag  ioFlag)
protectedvirtual

initializeFromCheckpointFlag: If set to true, initialize using checkpoint direcgtory set in HyPerCol.

Checkpoint read directory must be set in HyPerCol to initialize from checkpoint.

Reimplemented in PV::CloneConn, PV::TransposeConn, PV::CopyConn, PV::TransposePoolingConn, and PV::IdentConn.

Definition at line 359 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_postLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtual

postLayerName: Specifies the connection's post layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 250 of file BaseConnection.cpp.

void PV::BaseConnection::ioParam_preLayerName ( enum ParamsIOFlag  ioFlag)
protectedvirtual

preLayerName: Specifies the connection's pre layer

Required parameter

Reimplemented in PV::FeedbackConn.

Definition at line 246 of file BaseConnection.cpp.

int PV::BaseConnection::ioParams ( enum ParamsIOFlag  ioFlag)

Method for reading or writing the params from group in the parent HyPerCol's parameters. The group from params is selected using the name of the connection.

Note that ioParams is not virtual. To add parameters in a derived class, override ioParamFillGroup.

Definition at line 218 of file BaseConnection.cpp.

int PV::BaseConnection::ioParamsFillGroup ( enum ParamsIOFlag  ioFlag)
protectedvirtual

The virtual method for reading parameters from the parent HyPerCol's parameters, and writing to the output params file.

BaseConnection::ioParamsFillGroup reads/writes the paremeters preLayerName, postLayerName, channelCode, delay, numAxonalArbors, and convertRateToSpikeCount.

Derived classes with additional parameters typically override ioParamsFillGroup to call the base class's ioParamsFillGroup method and then call ioParam_[parametername] for each of their parameters. The ioParam_[parametername] methods should call the parent HyPerCol's ioParamValue() and related methods, to ensure that all parameters that get read also get written to the outputParams-generated file.

Reimplemented in PV::HyPerConn, PV::CloneConn, PV::TransposeConn, PV::TransposePoolingConn, PV::PoolingConn, PV::IdentConn, PV::ImprintConn, PV::privateTransposeConn, PV::CopyConn, PV::MomentumConn, PV::PlasticCloneConn, and PV::RescaleConn.

Definition at line 226 of file BaseConnection.cpp.

virtual bool PV::BaseConnection::needUpdate ( double  time,
double  dt 
)
protectedpure virtual

A pure virtual method whose implementation returns true if an the weights should update on the given timestep and false if not.

Implemented in PV::HyPerConn, PV::TransposePoolingConn, PV::TransposeConn, PV::privateTransposeConn, and PV::CopyConn.

int PV::BaseConnection::outputProbeParams ( )
virtual

Called by HyPerCol::outputParams to output the params groups for probes whose ownership has been transferred to this connection. (Does this need to be virtual?)

Reimplemented in PV::HyPerConn.

Definition at line 394 of file BaseConnection.cpp.

virtual int PV::BaseConnection::outputState ( double  timed,
bool  last = false 
)
pure virtual

A pure virtual function for writing the state of the connection to file(s) in the output directory. For example, HyPerConn writes the weights to a .pvp file with a schedule defined by writeStep and initialWriteTime.

Implemented in PV::HyPerConn, and PV::CloneConn.

virtual int PV::BaseConnection::readStateFromCheckpoint ( const char *  cpDir,
double *  timeptr 
)
protectedpure virtual

A pure virtual method that uses an existing checkpoint to initialize the connection. BaseConnection::initializeState calls it when initializeFromCheckpointFlag is true. A Subclass may also call this method as part of the implementation of checkpointRead (for example, HyPerConn does this).

Implemented in PV::HyPerConn, and PV::CloneConn.

void PV::BaseConnection::setChannelType ( ChannelType  ch)
protected

Sets the channel to the indicated argument. It is an error to try to change channels after communicateInitInfo() has completed successfully.

Definition at line 105 of file BaseConnection.cpp.

void PV::BaseConnection::setConvertRateToSpikeCount ( bool  convertRateToSpikeCountFlag)
protected

Sets the preActivityIsNotRate flag to the indicated argument. It is an error to try to change preActivityIsNotRate after communicateInitInfo() has completed successfully.

Definition at line 120 of file BaseConnection.cpp.

void PV::BaseConnection::setDataStructuresAllocatedFlag ( )
inline

This method sets the flag returned by getDataStructuresAllocatedFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful allocateDataStructures command (this behavior should probably be changed so that BaseConnection::allocateDataStructuresWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 94 of file BaseConnection.hpp.

void PV::BaseConnection::setDelay ( int  arborId,
float  delay 
)
protected

Sets the delay of the given arbor to the given amount. delay is specified in the same units that the parent HyPerCol's dt parameter is specified in. Internally, the delay is set as an integral number of timesteps, specifically round(delay/dt).

Definition at line 503 of file BaseConnection.cpp.

virtual int PV::BaseConnection::setInitialValues ( )
protectedpure virtual

A pure virtual method for initializing the connection if we are neither restarting from a checkpoint or initializing the connection from a checkpoint. It should return PV_SUCCESS if successful, or PV_POSTPONE if it needs to wait for other objects to set their initial values before it can set its own initial values. (e.g. TransposeConn has to wait for original conn)

Implemented in PV::HyPerConn, PV::CopyConn, PV::TransposeConn, PV::TransposePoolingConn, PV::PoolingConn, and PV::privateTransposeConn.

void PV::BaseConnection::setInitialValuesSetFlag ( )
inline

This method sets the flag returned by getInitialValuesSetFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful initializeState command (this behavior should probably be changed so that BaseConnection::allocateDataStructuresWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 127 of file BaseConnection.hpp.

void PV::BaseConnection::setInitInfoCommunicatedFlag ( )
inline

This method sets the flag returned by getInitInfoCommunicatedFlag() to true. It is public so that the parent HyPerCol's run method can set it after receiving a successful communicateInitInfo command (this behavior should probably be changed so that BaseConnection::communicateInitInfoWrapper, not the calling routine, is responsible for setting the flag).

Definition at line 65 of file BaseConnection.hpp.

void PV::BaseConnection::setNumberOfAxonalArborLists ( int  numArbors)
protected

Sets the number of arbors to the indicated argument. It is an error to try to change numArbors after communicateInitInfo() has completed successfully.

Definition at line 110 of file BaseConnection.cpp.

void PV::BaseConnection::setPostLayerName ( const char *  postName)
protected

Sets the postsynaptic layer name to the given string. It is an error to try to set postLayerName after it has already been set, or to call setPostLayerName() with a NULL argument.

Definition at line 72 of file BaseConnection.cpp.

void PV::BaseConnection::setPostSynapticLayer ( HyPerLayer post)
protected

Sets the postsynaptic layer to the given layer. It is an error to try to set postLayer after it has already been set, or to call setPostLayerName() with a NULL argument.

Definition at line 94 of file BaseConnection.cpp.

int PV::BaseConnection::setPreAndPostLayerNames ( )
protectedvirtual

Sets the pre- and post-synaptic layer names according to the parent HyPerCol's params. Virtual to allow subclasses to infer layer names in other ways (for example, FeedbackConn flips pre- and post- layers from originalConn).

Reimplemented in PV::FeedbackConn.

Definition at line 56 of file BaseConnection.cpp.

void PV::BaseConnection::setPreLayerName ( const char *  preName)
protected

Sets the presynaptic layer name to the given string. It is an error to try to set preLayerName after it has already been set, or to call setPreLayerName() with a NULL argument.

Definition at line 60 of file BaseConnection.cpp.

void PV::BaseConnection::setPreSynapticLayer ( HyPerLayer pre)
protected

Sets the presynaptic layer to the given layer. It is an error to try to set preLayer after it has already been set, or to call setPreLayerName() with a NULL argument.

Definition at line 83 of file BaseConnection.cpp.

virtual int PV::BaseConnection::updateState ( double  timed,
double  dt 
)
pure virtual

A pure virtual function for updating the state of the connection. timed is simulation time, and dt is the time increment between steps.

Implemented in PV::HyPerConn, PV::TransposePoolingConn, PV::TransposeConn, PV::CloneConn, and PV::privateTransposeConn.

virtual int PV::BaseConnection::writeTimers ( std::ostream &  stream)
pure virtual

A pure virtual function for writing timing information.

Implemented in PV::HyPerConn.


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