hpp-manipulation  4.9.0
Classes for manipulation planning.
connected-component.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015 CNRS
3 // Authors: Anna Seppala (seppala@laas.fr)
4 //
5 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_MANIPULATION_CONNECTED_COMPONENT_HH
20 #define HPP_MANIPULATION_CONNECTED_COMPONENT_HH
21 
22 #include <hpp/core/connected-component.hh>
23 #include <hpp/manipulation/config.hh>
24 #include <hpp/manipulation/fwd.hh>
26 
27 namespace hpp {
28  namespace manipulation {
32 class HPP_MANIPULATION_DLLAPI ConnectedComponent : public core::ConnectedComponent
33 {
34  public:
36  typedef std::map <graph::StatePtr_t, RoadmapNodes_t> GraphStates_t;
37 
39 
41  static ConnectedComponentPtr_t create (const RoadmapWkPtr_t& roadmap);
42 
46  void merge (const core::ConnectedComponentPtr_t& otherCC);
47 
50  void addNode (const core::NodePtr_t& node);
51 
52  const RoadmapNodes_t& getRoadmapNodes (const graph::StatePtr_t graphState) const;
53 
54  protected:
55  private:
56  bool check () const;
57  GraphStates_t graphStateMap_;
58  RoadmapPtr_t roadmap_;
59  static RoadmapNodes_t empty_;
60  }; // class ConnectedComponent
61  } // namespace manipulation
62 } // namespace hpp
63 #endif // HPP_MANIPULATION_CONNECTED_COMPONENT_HH
Definition: connected-component.hh:32
boost::shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:62
boost::shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
boost::shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
boost::shared_ptr< Roadmap > RoadmapPtr_t
Definition: fwd.hh:57
static GradientBasedPtr_t create(const Problem &problem)
std::vector< RoadmapNodePtr_t > RoadmapNodes_t
Definition: fwd.hh:60
ConnectedComponent()
Definition: connected-component.hh:38
std::map< graph::StatePtr_t, RoadmapNodes_t > GraphStates_t
Map of graph states within the connected component.
Definition: connected-component.hh:36