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

Add Graph::getConfigErrorForEdgeTarget

parent 9192914f
No related branches found
No related tags found
No related merge requests found
...@@ -201,6 +201,20 @@ namespace hpp { ...@@ -201,6 +201,20 @@ namespace hpp {
(ConfigurationIn_t leafConfig, ConfigurationIn_t config, (ConfigurationIn_t leafConfig, ConfigurationIn_t config,
const EdgePtr_t& edge, vector_t& error) const; const EdgePtr_t& edge, vector_t& error) const;
/// Get error of a config with respect to the target of an edge foliation leaf
///
/// \param leafConfig Configuration that determines the foliation leaf
/// \param config Configuration the error of which is computed
/// \retval error the error
/// \return whether config can be the end point of a path of the edge
/// starting at leafConfig
/// Call methods core::ConfigProjector::rightHandSideFromConfig with
/// leafConfig and then core::ConstraintSet::isSatisfied with config.
/// on the edge constraints.
bool getConfigErrorForEdgeTarget
(ConfigurationIn_t leafConfig, ConfigurationIn_t config,
const EdgePtr_t& edge, vector_t& error) const;
/// Constraint to project a path. /// Constraint to project a path.
/// \param edge a list of edges defining the foliation. /// \param edge a list of edges defining the foliation.
/// \return The constraint. /// \return The constraint.
......
...@@ -204,6 +204,16 @@ namespace hpp { ...@@ -204,6 +204,16 @@ namespace hpp {
return cs->isSatisfied (config, error); return cs->isSatisfied (config, error);
} }
bool Graph::getConfigErrorForEdgeTarget
(ConfigurationIn_t leafConfig, ConfigurationIn_t config,
const EdgePtr_t& edge, vector_t& error) const
{
ConstraintSetPtr_t cs (configConstraint (edge));
ConfigProjectorPtr_t cp (cs->configProjector ());
if (cp) cp->rightHandSideFromConfig (leafConfig);
return cs->isSatisfied (config, error);
}
bool Graph::getConfigErrorForEdgeLeaf bool Graph::getConfigErrorForEdgeLeaf
(ConfigurationIn_t leafConfig, ConfigurationIn_t config, (ConfigurationIn_t leafConfig, ConfigurationIn_t config,
const EdgePtr_t& edge, vector_t& error) const const EdgePtr_t& edge, vector_t& error) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment