Definitions.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Created by wrede on 27.05.16.
  3. //
  4. #ifndef GBMOT_DEFINITIONS_H
  5. #define GBMOT_DEFINITIONS_H
  6. #include "../core/ObjectData.h"
  7. #include <boost/graph/properties.hpp>
  8. #include <boost/graph/adjacency_list.hpp>
  9. typedef double Weight;
  10. typedef boost::property<boost::edge_weight_t, Weight> EdgeProp;
  11. typedef boost::property<boost::vertex_name_t, core::ObjectDataPtr> VertexProp;
  12. typedef boost::adjacency_list <boost::listS, boost::vecS, boost::directedS, VertexProp, EdgeProp>
  13. DirectedGraph;
  14. typedef boost::graph_traits<DirectedGraph>::edge_descriptor Edge;
  15. typedef boost::graph_traits<DirectedGraph>::vertex_descriptor Vertex;
  16. typedef boost::graph_traits<DirectedGraph>::edge_iterator EdgeIter;
  17. typedef boost::graph_traits<DirectedGraph>::out_edge_iterator OutEdgeIter;
  18. typedef boost::graph_traits<DirectedGraph>::vertex_iterator VertexIter;
  19. typedef boost::property_map<DirectedGraph, boost::edge_weight_t>::type EdgeWeightMap;
  20. typedef boost::property_map<DirectedGraph, boost::vertex_index_t>::type VertexIndexMap;
  21. typedef boost::property_map<DirectedGraph, boost::vertex_name_t>::type VertexValueMap;
  22. typedef boost::iterator_property_map<Vertex*, VertexIndexMap, Vertex, Vertex&> PredecessorMap;
  23. typedef boost::iterator_property_map<Weight*, VertexIndexMap, Weight, Weight&> DistanceMap;
  24. typedef boost::iterator_property_map<std::vector<Vertex>::iterator, VertexIndexMap, Vertex, Vertex&>
  25. VertexVertexMap;
  26. typedef std::unordered_map<Vertex, std::set<Vertex>> MultiPredecessorMap;
  27. typedef std::unordered_map<Vertex, Vertex> VertexPredecessorMap;
  28. typedef std::unordered_map<Vertex, Weight> VertexDistanceMap;
  29. #endif //GBMOT_DEFINITIONS_H