Skip to content
Snippets Groups Projects
Commit dfa2e127 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Update edge weights when projection failed.

parent 9462157f
Branches
Tags
No related merge requests found
......@@ -107,6 +107,7 @@ namespace hpp {
graph::EdgePtr_t edge = graph->chooseEdge (node);
qProj_ = *q_rand;
if (!edge->applyConstraints (n_near, qProj_)) {
node->updateWeight (edge, node->neighbors ().get(edge) + 1);
addFailure (PROJECTION, edge);
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment