17 #ifndef HPP_MANIPULATION_GRAPH_STATE_HH
18 # define HPP_MANIPULATION_GRAPH_STATE_HH
22 #include <hpp/core/constraint-set.hh>
23 #include <hpp/core/config-projector.hh>
24 #include <hpp/constraints/implicit.hh>
33 namespace manipulation {
34 using constraints::Implicit;
50 const StateWkPtr_t&,
const StateWkPtr_t&) >
81 isWaypoint_ = isWaypoint;
105 return neighbors_.values();
113 return hiddenNeighbors_;
125 throwIfNotInitialized ();
126 return configConstraints_;
140 numericalConstraintsForPath_.push_back (nm);
147 for (
const auto& nc : numericalConstraintsForPath_)
149 return !numericalConstraintsForPath_.empty ();
155 return numericalConstraintsForPath_;
163 void init (
const StateWkPtr_t&
self);
169 std::ostream&
print (std::ostream& os)
const;
188 StateSelectorWkPtr_t selector_;
static EdgePtr_t create(const std::string &name, const GraphWkPtr_t &graph, const StateWkPtr_t &from, const StateWkPtr_t &to)
Create a new empty Edge.
Define common methods of the graph components.
Definition: graph-component.hh:40
Edges_t neighborEdges() const
Get the neighbors.
Definition: state.hh:103
virtual void initialize()
const Neighbors_t & neighbors() const
Get the neighbors.
Definition: state.hh:97
bool insertNumericalConstraintsForPath(ConfigProjectorPtr_t &proj) const
Definition: state.hh:145
void stateSelector(const StateSelectorWkPtr_t &parent)
Set the StateSelector containing this state.
Definition: state.hh:91
StateSelectorWkPtr_t stateSelector() const
Get the parent StateSelector.
Definition: state.hh:85
void isWaypoint(bool isWaypoint)
Definition: state.hh:79
ConstraintSetPtr_t configConstraint() const
Constraint to project onto this state.
Definition: state.hh:123
static StatePtr_t create(const std::string &name)
Create a new state.
virtual bool contains(ConfigurationIn_t config) const
const NumericalConstraints_t & numericalConstraintsForPath() const
Get a reference to the NumericalConstraints_t.
Definition: state.hh:153
std::function< EdgePtr_t(const std::string &, const GraphWkPtr_t &, const StateWkPtr_t &, const StateWkPtr_t &) > EdgeFactory
Definition: state.hh:51
State(const std::string &name)
Constructor.
virtual void addNumericalConstraint(const ImplicitPtr_t &numConstraint)
std::ostream & dotPrint(std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
Print the object in a stream.
void init(const StateWkPtr_t &self)
Initialize the object.
EdgePtr_t linkTo(const std::string &name, const StatePtr_t &to, const size_type &w=1, EdgeFactory create=Edge::create)
const Edges_t & hiddenNeighbors() const
Definition: state.hh:111
virtual void addNumericalConstraintForPath(const ImplicitPtr_t &nm)
Add a constraint for paths that lie in this state.
Definition: state.hh:137
virtual void populateTooltip(dot::Tooltip &tp) const
Populate DrawingAttributes tooltip.
Weight_t getWeight(const EdgePtr_t &edge)
Get weight of edge starting from this state.
bool isWaypoint() const
Definition: state.hh:74
std::ostream & print(std::ostream &os) const
Print the object in a stream.
void updateWeight(const EdgePtr_t &edge, const Weight_t &w)
Set weight of edge starting from this state.
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
hpp::core::NumericalConstraints_t NumericalConstraints_t
Definition: fwd.hh:53
std::vector< EdgePtr_t > Edges_t
Definition: fwd.hh:46
shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
::hpp::statistics::DiscreteDistribution< EdgePtr_t >::Weight_t Weight_t
Definition: fwd.hh:47
shared_ptr< Edge > EdgePtr_t
Definition: fwd.hh:37
::hpp::statistics::DiscreteDistribution< EdgePtr_t > Neighbors_t
Definition: fwd.hh:48
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition: fwd.hh:115
constraints::ImplicitPtr_t ImplicitPtr_t
Definition: fwd.hh:108
core::ConfigProjectorPtr_t ConfigProjectorPtr_t
Definition: fwd.hh:113
core::size_type size_type
Definition: fwd.hh:83
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:38