From ca9be34b51f66f13ec635663e59651730251c390 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Wed, 15 Jun 2016 17:04:34 +0200
Subject: [PATCH] graph helper uses an unordered map instead of a vector.

---
 src/graph/helper.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/graph/helper.cc b/src/graph/helper.cc
index 4479743..199e71f 100644
--- a/src/graph/helper.cc
+++ b/src/graph/helper.cc
@@ -546,8 +546,8 @@ namespace hpp {
 
           struct Result {
             GraphPtr_t graph;
-            std::vector<NodeAndManifold_t> nodes;
-            typedef std::vector<NodeAndManifold_t>::size_type nodeid_type;
+            typedef unsigned long nodeid_type;
+            std::tr1::unordered_map<nodeid_type, NodeAndManifold_t> nodes;
             typedef std::pair<nodeid_type, nodeid_type> edgeid_type;
             struct edgeid_hash {
               std::tr1::hash<edgeid_type::first_type> first;
@@ -575,7 +575,6 @@ namespace hpp {
               dims[0] = nOH + 1;
               for (index_t i = 1; i < nG; ++i)
                 dims[i] = dims[i-1] * (nOH + 1);
-              nodes.resize (dims[nG-1] * (nOH + 1));
               graspCs.resize (nG * nOH);
               rulesCache = Eigen::MatrixXi::Constant(nG, nOH + 1, CompiledRule::Undefined);
             }
-- 
GitLab