Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
AllEdges Class Referenceabstract
Inheritance diagram for AllEdges:

Public Member Functions

 AllEdges (int numVertices, int maxEdges)
 
virtual void setupEdges ()
 Setup the internal structure of the class (allocate memories and initialize them).
 
virtual void loadParameters ()
 
virtual void printParameters () const
 
virtual BGSIZE addEdge (edgeType type, int srcVertex, int destVertex, BGFLOAT deltaT)
 
virtual void createEdge (BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT, edgeType type)=0
 
virtual void createEdgeIndexMap (EdgeIndexMap &edgeIndexMap)
 Populate a edge index map.
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 
virtual void advanceEdges (AllVertices &vertices, EdgeIndexMap &edgeIndexMap)
 
virtual void advanceEdge (BGSIZE iEdg, AllVertices &vertices)=0
 
virtual void eraseEdge (int neuronIndex, BGSIZE iEdg)
 

Public Attributes

vector< int > sourceVertexIndex_
 The location of the edge.
 
vector< int > destVertexIndex_
 The coordinates of the summation point.
 
vector< BGFLOAT > W_
 The weight (scaling factor, strength, maximal amplitude) of the edge.
 
vector< edgeType > type_
 Synapse type.
 
vector< unsigned char > inUse_
 The value indicating the entry in the array is in use.
 
vector< BGSIZE > edgeCounts_
 
BGSIZE totalEdgeCount_
 The total number of active edges.
 
BGSIZE maxEdgesPerVertex_
 The maximum number of edges for each vertex.
 
int countVertices_
 

Protected Member Functions

virtual void setupEdges (int numVertices, int maxEdges)
 
virtual void readEdge (istream &input, BGSIZE iEdg)
 
virtual void writeEdge (ostream &output, BGSIZE iEdg) const
 
edgeType edgeOrdinalToType (int typeOrdinal)
 

Protected Attributes

log4cplus::Logger fileLogger_
 Loggers used to print to using log4cplus logging macros, prints to Results/Debug/logging.txt.
 
log4cplus::Logger edgeLogger_
 

Detailed Description

Definition at line 21 of file AllEdges.h.

Constructor & Destructor Documentation

◆ AllEdges() [1/2]

AllEdges::AllEdges ( )

Definition at line 13 of file AllEdges.cpp.

◆ AllEdges() [2/2]

AllEdges::AllEdges ( int numVertices,
int maxEdges )

Definition at line 33 of file AllEdges.cpp.

Member Function Documentation

◆ addEdge()

BGSIZE AllEdges::addEdge ( edgeType type,
int srcVertex,
int destVertex,
BGFLOAT deltaT )
virtual

Adds a Edge to the model, connecting two Vertices.

Parameters
typeThe type of the Edge to add.
srcVertexThe Vertex that sends to this Edge.
destVertexThe Vertex that receives from the Edge.
deltaTInner simulation step duration
Returns
iEdg Index of the edge to be added.

Adds an edge to the model, connecting two Vertices.

Parameters
typeThe type of the edge to add.
srcVertexThe Vertex that sends to this edge.
destVertexThe Vertex that receives from the edge.
deltaTInner simulation step duration
Returns
iEdg Index of the edge to be added.

Definition at line 256 of file AllEdges.cpp.

◆ advanceEdge()

virtual void AllEdges::advanceEdge ( BGSIZE iEdg,
AllVertices & vertices )
pure virtual

Advance one specific Edge.

Parameters
iEdgIndex of the Edge to connect to.
verticesThe Vertex list to search from.

Implemented in All911Edges, AllSpikingSynapses, and AllSTDPSynapses.

◆ advanceEdges()

void AllEdges::advanceEdges ( AllVertices & vertices,
EdgeIndexMap & edgeIndexMap )
virtual

Advance all the edges in the simulation. Update the state of all edges for a time step.

Parameters
verticesThe Vertex list to search from.
edgeIndexMapPointer to EdgeIndexMap structure.

Advance all the edges in the simulation.

Parameters
verticesThe vertices.
edgeIndexMapPointer to EdgeIndexMap structure.

Reimplemented in All911Edges.

Definition at line 227 of file AllEdges.cpp.

◆ createEdge()

virtual void AllEdges::createEdge ( BGSIZE iEdg,
int srcVertex,
int destVertex,
BGFLOAT deltaT,
edgeType type )
pure virtual

Create a Edge and connect it to the model.

Parameters
iEdgIndex of the edge to set.
srcVertexCoordinates of the source Vertex.
destVertexCoordinates of the destination Vertex.
deltaTInner simulation step duration.
typeType of the Edge to create.

Implemented in All911Edges, AllDSSynapses, AllDynamicSTDPSynapses, AllSpikingSynapses, and AllSTDPSynapses.

◆ createEdgeIndexMap()

void AllEdges::createEdgeIndexMap ( EdgeIndexMap & edgeIndexMap)
virtual

Populate a edge index map.

Create a edge index map.

Definition at line 154 of file AllEdges.cpp.

◆ edgeOrdinalToType()

edgeType AllEdges::edgeOrdinalToType ( int typeOrdinal)
protected

Returns an appropriate edgeType object for the given integer.

Parameters
typeOrdinalInteger that correspond with a edgeType.
Returns
the SynapseType that corresponds with the given integer.

Definition at line 127 of file AllEdges.cpp.

◆ eraseEdge()

void AllEdges::eraseEdge ( int iVert,
BGSIZE iEdg )
virtual

Remove a edge from the network.

Parameters
neuronIndexIndex of a vertex to remove from.
iEdgIndex of a edge to remove.

Remove a edge from the network.

Parameters
iVertIndex of a vertex to remove from.
iEdgIndex of a edge to remove.

Definition at line 239 of file AllEdges.cpp.

◆ loadParameters()

void AllEdges::loadParameters ( )
virtual

Load member variables from configuration file. Registered to OperationManager as Operation::op::loadParameters

Reimplemented in AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 40 of file AllEdges.cpp.

◆ printParameters()

void AllEdges::printParameters ( ) const
virtual

Prints out all parameters to logging file. Registered to OperationManager as Operation::printParameters

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 47 of file AllEdges.cpp.

◆ readEdge()

void AllEdges::readEdge ( istream & input,
BGSIZE iEdg )
protectedvirtual

Sets the data for Edge to input's data.

Parameters
inputistream to read from.
iEdgIndex of the edge to set.

Sets the data for Synapse to input's data.

Parameters
inputistream to read from.
iEdgIndex of the edge to set.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, AllNeuroEdges, AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 91 of file AllEdges.cpp.

◆ serialize()

template<class Archive >
void AllEdges::serialize ( Archive & archive)

Cereal serialization method.

Cereal serialization method (Serializes edge weights, source vertices, and destination vertices)

Definition at line 228 of file AllEdges.h.

◆ setupEdges() [1/2]

void AllEdges::setupEdges ( )
virtual

Setup the internal structure of the class (allocate memories and initialize them).

Reimplemented in All911Edges, AllDSSynapses, AllDynamicSTDPSynapses, AllNeuroEdges, AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 59 of file AllEdges.cpp.

◆ setupEdges() [2/2]

void AllEdges::setupEdges ( int numVertices,
int maxEdges )
protectedvirtual

Setup the internal structure of the class (allocate memories and initialize them).

Parameters
numVerticesTotal number of vertices in the network.
maxEdgesMaximum number of edges per vertex.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, AllNeuroEdges, AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 69 of file AllEdges.cpp.

◆ writeEdge()

void AllEdges::writeEdge ( ostream & output,
BGSIZE iEdg ) const
protectedvirtual

Write the edge data to the stream.

Parameters
outputstream to print out to.
iEdgIndex of the edge to print out.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, AllNeuroEdges, AllSpikingSynapses, and AllSTDPSynapses.

Definition at line 114 of file AllEdges.cpp.

Member Data Documentation

◆ countVertices_

int AllEdges::countVertices_

The number of vertices Aaron: Is this even supposed to be here?! Usage: Used by destructor

Definition at line 223 of file AllEdges.h.

◆ destVertexIndex_

vector<int> AllEdges::destVertexIndex_

The coordinates of the summation point.

Definition at line 197 of file AllEdges.h.

◆ edgeCounts_

vector<BGSIZE> AllEdges::edgeCounts_

The number of (incoming) edges for each vertex. Note: Likely under a different name in GpuSim_struct, see edge_count. -Aaron

Definition at line 212 of file AllEdges.h.

◆ edgeLogger_

log4cplus::Logger AllEdges::edgeLogger_
protected

Definition at line 91 of file AllEdges.h.

◆ fileLogger_

log4cplus::Logger AllEdges::fileLogger_
protected

Loggers used to print to using log4cplus logging macros, prints to Results/Debug/logging.txt.

Definition at line 90 of file AllEdges.h.

◆ inUse_

vector<unsigned char> AllEdges::inUse_

The value indicating the entry in the array is in use.

Definition at line 208 of file AllEdges.h.

◆ maxEdgesPerVertex_

BGSIZE AllEdges::maxEdgesPerVertex_

The maximum number of edges for each vertex.

Definition at line 218 of file AllEdges.h.

◆ sourceVertexIndex_

vector<int> AllEdges::sourceVertexIndex_

The location of the edge.

Definition at line 194 of file AllEdges.h.

◆ totalEdgeCount_

BGSIZE AllEdges::totalEdgeCount_

The total number of active edges.

Definition at line 215 of file AllEdges.h.

◆ type_

vector<edgeType> AllEdges::type_

Synapse type.

Definition at line 203 of file AllEdges.h.

◆ W_

vector<BGFLOAT> AllEdges::W_

The weight (scaling factor, strength, maximal amplitude) of the edge.

Definition at line 200 of file AllEdges.h.


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