From 373ece550a9959e31d41f4548e12e653a887e9a6 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 11 Apr 2014 21:38:41 +0200 Subject: Disable the node names by default; they take a tiny bit of time. --- planning/planning.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'planning/planning.cpp') 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 &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) -- cgit v1.2.3