CXXGraph  0.1.6
CXXGraph is a header only, that manages the Graphs and it's algorithm in C++
Typedef.hpp
1 /***********************************************************/
2 /*** ______ ____ ______ _ ***/
3 /*** / ___\ \/ /\ \/ / ___|_ __ __ _ _ __ | |__ ***/
4 /*** | | \ / \ / | _| '__/ _` | '_ \| '_ \ ***/
5 /*** | |___ / \ / \ |_| | | | (_| | |_) | | | | ***/
6 /*** \____/_/\_\/_/\_\____|_| \__,_| .__/|_| |_| ***/
7 /*** |_| ***/
8 /***********************************************************/
9 /*** Header-Only C++ Library for Graph ***/
10 /*** Representation and Algorithms ***/
11 /***********************************************************/
12 /*** Author: ZigRazor ***/
13 /*** E-Mail: zigrazor@gmail.com ***/
14 /***********************************************************/
15 /*** Collaboration: ----------- ***/
16 /***********************************************************/
17 /*** License: AGPL v3.0 ***/
18 /***********************************************************/
19 
20 #ifndef __CXXGRAPH_TYPEDEF_H__
21 #define __CXXGRAPH_TYPEDEF_H__
22 
23 #pragma once
24 
25 #include <map>
26 #include <string>
27 #include <fstream>
28 
29 namespace CXXGRAPH
30 {
31 
32  template <typename T>
33  class Node;
34 
35  template <typename T>
36  class Edge;
37 
38  namespace PARTITIONING{
39  template<typename T>
40  class Partition;
41  }
42  // ENUMERATION //////////////////////////////////////
43 
45  enum E_InputOutputFormat
46  {
47  STANDARD_CSV,
48  STANDARD_TSV,
49  OUT_1,
50  OUT_2
51  };
52 
53  typedef E_InputOutputFormat InputOutputFormat;
54 
55 
56 
58  // Structures ///////////////////////////////////////
59 
62  {
63  bool success; // TRUE if the function does not return error, FALSE otherwise
64  std::string errorMessage; //message of error
65  double result; //result (valid only if success is TRUE)
66  };
68 
71  {
72  bool success; // TRUE if the function does not return error, FALSE otherwise
73  std::string errorMessage; //message of error
74  std::map<unsigned long, long> minDistanceMap; //result a map that contains the node id and the minumum distance from source (valid only if success is TRUE)
75  };
77 
79 
80 
82  // Using Definition ///////////////////////////////////////////////////////////////
83 
84  template <typename T>
85  using AdjacencyMatrix = std::map<const Node<T> *, std::vector<std::pair<const Node<T> *, const Edge<T> *>>>;
86 
87  template <typename T>
88  using PartitionMap = std::map<unsigned int, PARTITIONING::Partition<T> *>;
89 
91 }
92 
93 #endif // __CXXGRAPH_TYPEDEF_H__
Definition: Edge.hpp:40
Struct that contains the information about Dijsktra's Algorithm results.
Definition: Typedef.hpp:71
Struct that contains the information about Dijsktra's Algorithm results.
Definition: Typedef.hpp:62