Skip to content

Commit 2c58c22

Browse files
author
Vanessa Arndorfer
committed
remove vertices parameter from updateConnections
1 parent 655f333 commit 2c58c22

File tree

10 files changed

+16
-19
lines changed

10 files changed

+16
-19
lines changed

Simulator/Connections/Connections.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ void Connections::createEdgeIndexMap()
8181

8282
/// Update the connections status in every epoch.
8383
///
84-
/// @param vertices The vertex list to search from.
8584
/// @return true if successful, false otherwise.
86-
bool Connections::updateConnections(AllVertices &vertices)
85+
bool Connections::updateConnections()
8786
{
8887
return false;
8988
}

Simulator/Connections/Connections.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ class Connections {
6767

6868
/// Update the connections status in every epoch.
6969
///
70-
/// @param vertices The vertex list to search from.
7170
/// @return true if successful, false otherwise.
72-
virtual bool updateConnections(AllVertices &vertices);
71+
virtual bool updateConnections();
7372

7473
/// Cereal serialization method
7574
template <class Archive> void serialize(Archive &archive);

Simulator/Connections/NG911/Connections911.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void Connections911::printParameters() const
6363

6464
#if !defined(USE_GPU)
6565
/// Update the connections status in every epoch.
66-
bool Connections911::updateConnections(AllVertices &vertices)
66+
bool Connections911::updateConnections()
6767
{
6868
// Only run on the first epoch
6969
if (Simulator::getInstance().getCurrentStep() != 1) {
@@ -73,6 +73,7 @@ bool Connections911::updateConnections(AllVertices &vertices)
7373
// Record old type map
7474
int numVertices = Simulator::getInstance().getTotalVertices();
7575
Layout &layout = Simulator::getInstance().getModel().getLayout();
76+
AllVertices &vertices = layout.getVertices();
7677
oldTypeMap_ = layout.vertexTypeMap_;
7778

7879
// Erase PSAPs

Simulator/Connections/NG911/Connections911.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ class Connections911 : public Connections {
7272
/// Update the connections status in every epoch.
7373
/// Uses the parent definition for USE_GPU
7474
///
75-
/// @param vertices The Vertex list to search from.
7675
/// @return true if successful, false otherwise.
77-
virtual bool updateConnections(AllVertices &vertices) override;
76+
virtual bool updateConnections() override;
7877

7978
/// Finds the outgoing edge from the given vertex to the Responder closest to
8079
/// the emergency call location

Simulator/Connections/Neuro/ConnGrowth.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ void ConnGrowth::printParameters() const
126126

127127
/// Update the connections status in every epoch.
128128
///
129-
/// @param vertices The vertex list to search from.
130129
/// @return true if successful, false otherwise.
131-
bool ConnGrowth::updateConnections(AllVertices &vertices)
130+
bool ConnGrowth::updateConnections()
132131
{
132+
Layout &layout = Simulator::getInstance().getModel().getLayout();
133+
AllVertices &vertices = layout.getVertices();
134+
133135
// Update Connections data
134136
updateConns(vertices);
135137

Simulator/Connections/Neuro/ConnGrowth.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ class ConnGrowth : public Connections {
103103

104104
/// Update the connections status in every epoch.
105105
///
106-
/// @param vertices The vertex list to search from.
107106
/// @return true if successful, false otherwise.
108-
virtual bool updateConnections(AllVertices &vertices) override;
107+
virtual bool updateConnections() override;
109108

110109
/// Cereal serialization method
111110
template <class Archive> void serialize(Archive &archive);

Simulator/Connections/Neuro/ConnStatic.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ void ConnStatic::printParameters() const
9090
{
9191
}
9292

93-
/// Update the connections status in every epoch.
93+
/// Output the weights matrix after every epoch.
9494
///
95-
/// @param vertices The vertex list to search from.
9695
/// @return true if successful, false otherwise.
97-
bool ConnStatic::updateConnections(AllVertices &vertices)
96+
bool ConnStatic::updateConnections()
9897
{
9998
AllNeuroEdges &synapses = dynamic_cast<AllNeuroEdges &>(*edges_);
10099
synapses.outputWeights(Simulator::getInstance().getCurrentStep());

Simulator/Connections/Neuro/ConnStatic.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ class ConnStatic : public Connections {
8080
return destVertexIndexCurrentEpoch_;
8181
}
8282

83-
/// Update the connections status in every epoch.
83+
/// Output the weights matrix after every epoch.
8484
///
85-
/// @param vertices The vertex list to search from.
8685
/// @return true if successful, false otherwise.
87-
virtual bool updateConnections(AllVertices &vertices) override;
86+
virtual bool updateConnections() override;
8887

8988
/// Cereal serialization method
9089
template <class Archive> void serialize(Archive &archive);

Simulator/Core/CPUModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void CPUModel::advance()
3535
void CPUModel::updateConnections()
3636
{
3737
// Update Connections data
38-
if (connections_->updateConnections(layout_->getVertices())) {
38+
if (connections_->updateConnections()) {
3939
connections_->updateEdgesWeights();
4040
// create edge inverse map
4141
connections_->createEdgeIndexMap();

Simulator/Edges/Neuro/AllSpikingSynapses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,5 +389,5 @@ void AllSpikingSynapses::outputWeights(int epochNum)
389389
outFile << "</Graph>";
390390
outFile.close();
391391

392-
cout << "Success: XML written to " << filename << endl;
392+
cout << "Weights matrix output to: " << filename << endl;
393393
}

0 commit comments

Comments
 (0)