17#ifndef NeTrainSim_ReadWriteNetwork_h
18#define NeTrainSim_ReadWriteNetwork_h
24#include "../util/vector.h"
37Vector<std::tuple<int, double, double, std::string,
48 double>> nodesRecords,
49 std::string& filename);
59Vector<std::tuple<int, int, int, double, int, double,
60 double, int, double, bool, string,
70 double,
double,
int,
double,
72 double> > linksRecords,
73 std::string& filename);
81 Vector<std::tuple<
int,
double,
double,
82 std::string,
double,
double>> nodesRecords);
91 Vector<std::tuple<int, int, int, double, int, double, double, int, double, bool, string, string, double> > linksRecords);
102 Vector<std::shared_ptr<NetNode>> theFileNodes,
int oldID);
A vector.
Definition vector.h:24
Definition readwritenetwork.h:27
bool writeNodesFile(Vector< std::tuple< int, double, double, std::string, double, double > > nodesRecords, std::string &filename)
Writes the nodes file.
Vector< std::tuple< int, double, double, std::string, double, double > > readNodesFile(const std::string &fileName)
Reads the nodes file.
Definition readwritenetwork.cpp:24
Vector< std::shared_ptr< NetLink > > generateLinks(Vector< std::shared_ptr< NetNode > > theFileNodes, Vector< std::tuple< int, int, int, double, int, double, double, int, double, bool, string, string, double > > linksRecords)
Generates NetLink objects from the nodes and links records.
Vector< std::tuple< int, int, int, double, int, double, double, int, double, bool, string, string, double > > readLinksFile(const std::string &fileName)
Reads the links file.
Definition readwritenetwork.cpp:134
Vector< std::shared_ptr< NetNode > > generateNodes(Vector< std::tuple< int, double, double, std::string, double, double > > nodesRecords)
Generates NetNode objects from the nodes records.
Definition readwritenetwork.cpp:266
std::shared_ptr< NetNode > getSimulatorNodeByUserID(Vector< std::shared_ptr< NetNode > > theFileNodes, int oldID)
Gets the NetNode object with the given user identifier.
Definition readwritenetwork.cpp:334
bool writeLinksFile(Vector< std::tuple< int, int, int, double, int, double, double, int, double, bool, string, string, double > > linksRecords, std::string &filename)
Writes the links file.
This file contains the declaration of the NetLink class.
This file contains the declaration of the NetNode class.