Skip to content

Commit fc7366a

Browse files
author
Vanessa Arndorfer
committed
clang fixes
1 parent 65c7e9e commit fc7366a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Simulator/Connections/Neuro/ConnStatic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ bool ConnStatic::updateConnections(AllVertices &vertices)
9898
{
9999
AllNeuroEdges &synapses = dynamic_cast<AllNeuroEdges &>(*edges_);
100100
synapses.outputWeights(Simulator::getInstance().getCurrentStep());
101-
101+
102102
return true;
103103
}

Simulator/Edges/Neuro/AllSpikingSynapses.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,14 @@ void AllSpikingSynapses::printSynapsesProps() const
334334
}
335335
}
336336

337-
string vectorToXML(const vector<BGFLOAT>& matrix, int rows, int cols, const string& name) {
337+
string vectorToXML(const vector<BGFLOAT> &matrix, int rows, int cols, const string &name)
338+
{
338339
ostringstream os;
339340
os << "<" << name << " rows=\"" << rows << "\" columns=\"" << cols << "\">\n";
340341

341342
int index = 0;
342-
for_each(matrix.begin(), matrix.end(), [&](BGFLOAT value) mutable {
343+
for_each(matrix.begin(), matrix.end(), [&](BGFLOAT value) mutable
344+
{
343345
os << " <value" << index << ">" << value << "</value" << index << ">\n";
344346
index++;
345347
});
@@ -348,12 +350,14 @@ string vectorToXML(const vector<BGFLOAT>& matrix, int rows, int cols, const stri
348350
return os.str();
349351
}
350352

351-
string vectorToXML(const vector<int>& matrix, int rows, int cols, const string& name) {
353+
string vectorToXML(const vector<int> &matrix, int rows, int cols, const string &name)
354+
{
352355
ostringstream os;
353356
os << "<" << name << " rows=\"" << rows << "\" columns=\"" << cols << "\">\n";
354357

355358
int index = 0;
356-
for_each(matrix.begin(), matrix.end(), [&](int value) mutable {
359+
for_each(matrix.begin(), matrix.end(), [&](int value) mutable
360+
{
357361
os << " <value" << index << ">" << value << "</value" << index << ">\n";
358362
index++;
359363
});
@@ -362,11 +366,12 @@ string vectorToXML(const vector<int>& matrix, int rows, int cols, const string&
362366
return os.str();
363367
}
364368

365-
void AllSpikingSynapses::outputWeights(int epochNum) {
366-
const std::string filename = "./Output/Results/weights-epoch-" + std::to_string(epochNum) + ".xml"; // Hardcoded filename
369+
void AllSpikingSynapses::outputWeights(int epochNum)
370+
{
371+
const std::string filename = "./Output/Results/weights-epoch-" + std::to_string(epochNum) + ".xml"; // Hardcoded filename
367372
int vertexCount = Simulator::getInstance().getTotalVertices();
368-
369-
ofstream outFile(filename);
373+
374+
ofstream outFile(filename);
370375
if (!outFile) {
371376
cerr << "Error: Unable to open file " << filename << endl;
372377
cerr << "Error details: " << strerror(errno) << endl;
@@ -377,7 +382,7 @@ void AllSpikingSynapses::outputWeights(int epochNum) {
377382

378383
string wContent = vectorToXML(W_, vertexCount, maxEdges, "WeightMatrix");
379384
string srcContent = vectorToXML(sourceVertexIndex_, vertexCount, maxEdges, "SourceVertexIndex");
380-
385+
381386
outFile << "<Graph>\n";
382387
outFile << wContent;
383388
outFile << srcContent;

0 commit comments

Comments
 (0)