Skip to content

Commit c415a4b

Browse files
committed
fix: Add header in network and states output
1 parent 39cd4e4 commit c415a4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/StateNetwork.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ void StateNetwork::writeStateNetwork(std::string filename) const
327327

328328
SafeOutFile outFile(filename);
329329

330+
outFile << "# v" << INFOMAP_VERSION << "\n" <<
331+
"# ./Infomap " << m_config.parsedString << "\n";
332+
330333
if (!m_names.empty()) {
331334
outFile << "*Vertices\n";
332335
for (auto& nameIt : m_names) {
@@ -363,6 +366,11 @@ void StateNetwork::writePajekNetwork(std::string filename) const
363366

364367
SafeOutFile outFile(filename);
365368

369+
outFile << "# v" << INFOMAP_VERSION << "\n" <<
370+
"# ./Infomap " << m_config.parsedString << "\n";
371+
if (m_config.isMemoryNetwork())
372+
outFile << "# State network as physical network\n";
373+
366374
outFile << "*Vertices\n";
367375
for (const auto& nodeIt : nodes()) {
368376
const auto& node = nodeIt.second;

0 commit comments

Comments
 (0)