From 18517c3ad70dc7379439cab5a776e330fb882f68 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Thu, 24 Jul 2014 20:54:08 +0200
Subject: [PATCH] Add maxIterations, errorThreshold to class Graph

---
 include/hpp/manipulation/graph/graph.hh | 41 +++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/include/hpp/manipulation/graph/graph.hh b/include/hpp/manipulation/graph/graph.hh
index b4aa0224..304d8a53 100644
--- a/include/hpp/manipulation/graph/graph.hh
+++ b/include/hpp/manipulation/graph/graph.hh
@@ -168,7 +168,45 @@ namespace hpp {
           /// Print the object in a stream.
           std::ostream& print (std::ostream& os) const;
 
+          /// Add a core::DifferentiableFunction function.
+          virtual void addNumericalConstraint (const core::DifferentiableFunctionPtr_t& /* function */)
+          {
+            HPP_THROW_EXCEPTION (Bad_function_call, "This component does not have constraints.");
+          }
+
+          /// Add a core::LockedDof constraint.
+          virtual void addLockedDofConstraint (const core::LockedDof& /* constraint */)
+          {
+            HPP_THROW_EXCEPTION (Bad_function_call, "This component does not have constraints.");
+          }
+
+          /// Set maximal number of iterations
+          void maxIterations (size_type iterations)
+          {
+            maxIterations_ = iterations;
+          }
+          /// Get maximal number of iterations in config projector
+          size_type maxIterations () const
+          {
+            return maxIterations_;
+          }
 
+          /// Set error threshold
+          void errorThreshold (const value_type& threshold)
+          {
+            errorThreshold_ = threshold;
+          }
+          /// Get errorimal number of threshold in config projector
+          value_type errorThreshold () const
+          {
+            return errorThreshold_;
+          }
+
+          /// Get the robot.
+          const RobotPtr_t& robot () const
+          {
+            return robot_;
+          }
         protected:
           /// Initialization of the object.
           void init (const GraphWkPtr_t& weak, RobotPtr_t robot);
@@ -190,6 +228,9 @@ namespace hpp {
 
           /// Weak pointer to itself.
           GraphWkPtr_t wkPtr_;
+
+          value_type errorThreshold_;
+          size_type maxIterations_;
       }; // Class Graph
     } // namespace graph
   } // namespace manipulation
-- 
GitLab