projects
/
mtp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed the rule for random-graph.
[mtp.git]
/
mtp_graph.cc
diff --git
a/mtp_graph.cc
b/mtp_graph.cc
index
d3c3c12
..
2dd145d
100644
(file)
--- a/
mtp_graph.cc
+++ b/
mtp_graph.cc
@@
-189,15
+189,14
@@
void MTPGraph::force_positivized_lengths() {
scalar_t residual_error = 0.0;
scalar_t max_error = 0.0;
#endif
scalar_t residual_error = 0.0;
scalar_t max_error = 0.0;
#endif
- for(int
n = 0; n < _nb_vertices; n
++) {
- for(Edge *e = _vertices[n].leaving_edges; e; e = e->next_leaving_edge) {
-
if(e->positivized_length < 0) {
+ for(int
k = 0; k < _nb_edges; k
++) {
+ Edge *e = _edges + k;
+ if(e->positivized_length < 0) {
#ifdef VERBOSE
#ifdef VERBOSE
-
residual_error -= e->positivized_length;
-
max_error = max(max_error, - e->positivized_length);
+ residual_error -= e->positivized_length;
+ max_error = max(max_error, - e->positivized_length);
#endif
#endif
- e->positivized_length = 0.0;
- }
+ e->positivized_length = 0.0;
}
}
#ifdef VERBOSE
}
}
#ifdef VERBOSE