aboutsummaryrefslogtreecommitdiffstats
path: root/planning/planning.cpp
diff options
context:
space:
mode:
authorSteinar H. Gunderson <sgunderson@bigfoot.com>2014-04-11 21:38:41 +0200
committerSteinar H. Gunderson <sgunderson@bigfoot.com>2014-04-11 21:38:41 +0200
commit373ece550a9959e31d41f4548e12e653a887e9a6 (patch)
treef1a02fadfd1484322e19592e94a2293b582baa47 /planning/planning.cpp
parent6423562a0906ed6d7b4ff15bffcb581307be2532 (diff)
Disable the node names by default; they take a tiny bit of time.
Diffstat (limited to 'planning/planning.cpp')
-rw-r--r--planning/planning.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/planning/planning.cpp b/planning/planning.cpp
index 0878909..590d6b1 100644
--- a/planning/planning.cpp
+++ b/planning/planning.cpp
@@ -418,19 +418,25 @@ void Planner::construct_graph(const vector<Switch> &switches, Graph *g)
}
g->all_nodes.push_back(&g->source_node);
- strcpy(g->source_node.name, "source");
-
g->all_nodes.push_back(&g->sink_node);
- strcpy(g->sink_node.name, "sink");
for (unsigned i = 0; i < NUM_DISTRO; ++i) {
g->all_nodes.push_back(&g->distro_nodes[i]);
- sprintf(g->distro_nodes[i].name, "distro%d", i);
}
for (unsigned i = 0; i < switches.size(); ++i) {
g->all_nodes.push_back(&g->switch_nodes[i]);
+ }
+
+#if 0
+ strcpy(g->source_node.name, "source");
+ strcpy(g->sink_node.name, "sink");
+ for (unsigned i = 0; i < NUM_DISTRO; ++i) {
+ sprintf(g->distro_nodes[i].name, "distro%d", i);
+ }
+ for (unsigned i = 0; i < switches.size(); ++i) {
sprintf(g->switch_nodes[i].name, "switch%d", i);
}
+#endif
}
void Planner::find_mincost_maxflow(Graph *g)