Commit 889db853 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Add method isSatisfied as required by commit a23e5a9 in hpp-core.

parent 147d7aef
...@@ -271,11 +271,16 @@ namespace svd { ...@@ -271,11 +271,16 @@ namespace svd {
public: public:
vector_t offsetFromConfig (ConfigurationIn_t /* config */) {return vector_t ();} vector_t offsetFromConfig (ConfigurationIn_t /* config */) {return vector_t ();}
bool isSatisfied (ConfigurationIn_t config) { bool isSatisfied (ConfigurationIn_t config) {
computeValueAndJacobian (config); computeValueAndJacobian (config);
return value_.squaredNorm () < squareErrorThreshold_; return value_.squaredNorm () < squareErrorThreshold_;
} }
bool isSatisfied (ConfigurationIn_t config, vector_t& error) {
computeValueAndJacobian (config);
return value_.squaredNorm () - squareErrorThreshold_;
}
void addConstraint (const DifferentiableFunctionPtr_t& constraint) void addConstraint (const DifferentiableFunctionPtr_t& constraint)
{ {
size_ += constraint->outputSize (); size_ += constraint->outputSize ();
...@@ -452,7 +457,7 @@ namespace svd { ...@@ -452,7 +457,7 @@ namespace svd {
mutable matrix_t reducedJacobian_; mutable matrix_t reducedJacobian_;
mutable vector_t dqSmall_; mutable vector_t dqSmall_;
}; // class SVDTest }; // class SVDTest
struct Result { struct Result {
Configuration_t before, after; Configuration_t before, after;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment