Tracore
FileIO.h
1 //
2 // Created by wrede on 19.04.16.
3 //
4 
5 #ifndef GBMOT_FILEIO_H
6 #define GBMOT_FILEIO_H
7 
8 #include <string>
9 #include <fstream>
10 #include <vector>
11 #include "../core/ObjectData.h"
12 #include "../graph/Definitions.h"
13 
14 namespace util
15 {
16  typedef std::vector<std::vector<std::vector<double>>> Vector3d;
17  typedef std::vector<std::vector<double>> Vector2d;
18 
22  class FileIO
23  {
24  public:
36  static void ReadCSV(Vector3d& values,
37  const std::string& filename,
38  char delimiter = ';');
39 
47  static void ReadCSV(Vector2d& values,
48  const std::string& filename,
49  char delimiter = ';');
50 
57  static void ListFiles(const std::string& folder,
58  std::vector<std::string>& file_names,
59  bool sort = true);
60 
68  static void WriteCSVMatlab(DirectedGraph& graph,
69  const std::string& file_name,
70  char delimiter = ';');
71  };
72 }
73 
74 
75 #endif //GBMOT_FILEIO_H
Definition: FileIO.cpp:10
static void ListFiles(const std::string &folder, std::vector< std::string > &file_names, bool sort=true)
Definition: FileIO.cpp:97
static void ReadCSV(Vector3d &values, const std::string &filename, char delimiter=';')
Definition: FileIO.cpp:12
Definition: FileIO.h:22
static void WriteCSVMatlab(DirectedGraph &graph, const std::string &file_name, char delimiter=';')
Definition: FileIO.cpp:131