浏览代码

Change definition of edge properties

Eric Ramat 10 年之前
父节点
当前提交
ac7e3604c9
共有 1 个文件被更改,包括 11 次插入2 次删除
  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;