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 {
public:
vector_t offsetFromConfig (ConfigurationIn_t /* config */) {return vector_t ();}
bool isSatisfied (ConfigurationIn_t config) {
bool isSatisfied (ConfigurationIn_t config) {
computeValueAndJacobian (config);
return value_.squaredNorm () < squareErrorThreshold_;
}
bool isSatisfied (ConfigurationIn_t config, vector_t& error) {
computeValueAndJacobian (config);
return value_.squaredNorm () - squareErrorThreshold_;
}
void addConstraint (const DifferentiableFunctionPtr_t& constraint)
{
size_ += constraint->outputSize ();
......@@ -452,7 +457,7 @@ namespace svd {
mutable matrix_t reducedJacobian_;
mutable vector_t dqSmall_;
}; // class SVDTest
}; // class SVDTest
struct Result {
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