Skip to content

Commit

Permalink
fix: Add header in network and states output
Browse files Browse the repository at this point in the history
  • Loading branch information
danieledler committed Mar 9, 2020
1 parent 39cd4e4 commit c415a4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/StateNetwork.cpp
Expand Up @@ -327,6 +327,9 @@ void StateNetwork::writeStateNetwork(std::string filename) const

SafeOutFile outFile(filename);

outFile << "# v" << INFOMAP_VERSION << "\n" <<
"# ./Infomap " << m_config.parsedString << "\n";

if (!m_names.empty()) {
outFile << "*Vertices\n";
for (auto& nameIt : m_names) {
Expand Down Expand Up @@ -363,6 +366,11 @@ void StateNetwork::writePajekNetwork(std::string filename) const

SafeOutFile outFile(filename);

outFile << "# v" << INFOMAP_VERSION << "\n" <<
"# ./Infomap " << m_config.parsedString << "\n";
if (m_config.isMemoryNetwork())
outFile << "# State network as physical network\n";

outFile << "*Vertices\n";
for (const auto& nodeIt : nodes()) {
const auto& node = nodeIt.second;
Expand Down

0 comments on commit c415a4b

Please sign in to comment.