From cd9bab5db4ff332fd39f29f52ab98372bd033ebb Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Wed, 16 Jul 2014 19:07:22 +0200 Subject: [PATCH] remove computation of debug-only variable --- boost/graph/kamada_kawai_spring_layout.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/boost/graph/kamada_kawai_spring_layout.hpp b/boost/graph/kamada_kawai_spring_layout.hpp index 63355c9..a11a989 100644 --- a/boost/graph/kamada_kawai_spring_layout.hpp +++ b/boost/graph/kamada_kawai_spring_layout.hpp @@ -265,16 +265,16 @@ namespace boost { do { // For debugging, compute the energy value E - double E = 0.; - for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { - vertex_iterator vi = ui; - for (++vi; vi != end; ++vi) { - double dist = topology.distance(position[*ui], position[*vi]); - weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)]; - weight_type l_ij = distance[get(index, *ui)][get(index, *vi)]; - E += .5 * k_ij * (dist - l_ij) * (dist - l_ij); - } - } + // double E = 0.; + // for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { + // vertex_iterator vi = ui; + // for (++vi; vi != end; ++vi) { + // double dist = topology.distance(position[*ui], position[*vi]); + // weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)]; + // weight_type l_ij = distance[get(index, *ui)][get(index, *vi)]; + // E += .5 * k_ij * (dist - l_ij) * (dist - l_ij); + // } + // } // std::cerr << "E = " << E << std::endl; // Compute the elements of the Jacobian -- 1.7.10.4