From cd9bab5db4ff332fd39f29f52ab98372bd033ebb Mon Sep 17 00:00:00 2001
From: Thomas Otto <totto@zbh.uni-hamburg.de>
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
|
b
|
namespace boost {
|
265 | 265 | |
266 | 266 | do { |
267 | 267 | // For debugging, compute the energy value E |
268 | | double E = 0.; |
269 | | for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { |
270 | | vertex_iterator vi = ui; |
271 | | for (++vi; vi != end; ++vi) { |
272 | | double dist = topology.distance(position[*ui], position[*vi]); |
273 | | weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)]; |
274 | | weight_type l_ij = distance[get(index, *ui)][get(index, *vi)]; |
275 | | E += .5 * k_ij * (dist - l_ij) * (dist - l_ij); |
276 | | } |
277 | | } |
| 268 | // double E = 0.; |
| 269 | // for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { |
| 270 | // vertex_iterator vi = ui; |
| 271 | // for (++vi; vi != end; ++vi) { |
| 272 | // double dist = topology.distance(position[*ui], position[*vi]); |
| 273 | // weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)]; |
| 274 | // weight_type l_ij = distance[get(index, *ui)][get(index, *vi)]; |
| 275 | // E += .5 * k_ij * (dist - l_ij) * (dist - l_ij); |
| 276 | // } |
| 277 | // } |
278 | 278 | // std::cerr << "E = " << E << std::endl; |
279 | 279 | |
280 | 280 | // Compute the elements of the Jacobian |