Parcourir la source

Change definition of edge properties

Eric Ramat il y a 11 ans
Parent
commit
ac7e3604c9
1 fichiers modifiés avec 11 ajouts et 2 suppressions
  1. 11 2
      src/tests/boost_graph/graph_manager.hpp

+ 11 - 2
src/tests/boost_graph/graph_manager.hpp

@@ -53,9 +53,18 @@ struct VertexProperties
     { }
 };
 
-typedef boost::property < boost::edge_weight_t, double > EdgeProperty;
+struct EdgeProperties
+{
+    double       _weight;
+
+    EdgeProperties() : _weight(0)
+    { }
+    EdgeProperties(double weight) : _weight(weight)
+    { }
+};
+
 typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::directedS,
-                                VertexProperties, EdgeProperty> Graph;
+                                VertexProperties, EdgeProperties> Graph;
 typedef std::vector < Graph > Graphs;
 
 typedef std::pair < int, int > Edge;