|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63049 - trunk/libs/graph/example
From: jewillco_at_[hidden]
Date: 2010-06-17 13:46:46
Author: jewillco
Date: 2010-06-17 13:46:46 EDT (Thu, 17 Jun 2010)
New Revision: 63049
URL: http://svn.boost.org/trac/boost/changeset/63049
Log:
Made OSPF example run correctly
Text files modified:
trunk/libs/graph/example/ospf-example.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Modified: trunk/libs/graph/example/ospf-example.cpp
==============================================================================
--- trunk/libs/graph/example/ospf-example.cpp (original)
+++ trunk/libs/graph/example/ospf-example.cpp 2010-06-17 13:46:46 EDT (Thu, 17 Jun 2010)
@@ -22,18 +22,20 @@
typedef
adjacency_list<vecS, vecS, directedS,
property<vertex_name_t, std::string>,
- property<edge_color_t, std::string, property<edge_weight_t, int> >,
+ property<edge_color_t, std::string,
+ property<edge_weight_t, int> >,
property<graph_color_t, std::string> >
g_dot_type;
g_dot_type g_dot;
- dynamic_properties dp;
- dp.property("label", get(vertex_name, g_dot));
+ dynamic_properties dp(ignore_other_properties);
+ dp.property("node_id", get(vertex_name, g_dot));
+ dp.property("label", get(edge_weight, g_dot));
dp.property("color", get(edge_color, g_dot));
dp.property("color", ref_property_map<g_dot_type*, std::string>(get_property(g_dot, graph_color)));
{
std::ifstream infile("figs/ospf-graph.dot");
- read_graphviz(infile, g_dot, dp, "label");
+ read_graphviz(infile, g_dot, dp);
}
typedef adjacency_list < vecS, vecS, directedS, no_property,
@@ -83,7 +85,7 @@
get_property(g_dot, graph_color) = "grey";
{
std::ofstream outfile("figs/ospf-sptree.dot");
- write_graphviz_dp(outfile, g_dot, dp, "label");
+ write_graphviz_dp(outfile, g_dot, dp);
}
std::ofstream rtable("routing-table.dat");
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk