hpp-core  4.12.0
Implement basic classes for canonical path planning for kinematic chains.
node.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
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_CORE_NODE_HH
20 # define HPP_CORE_NODE_HH
21 
22 # include <hpp/pinocchio/fwd.hh>
23 # include <hpp/core/fwd.hh>
24 # include <hpp/core/config.hh>
25 # include <hpp/util/serialization-fwd.hh>
26 
27 namespace hpp {
28  namespace core {
31 
36  public:
37  typedef std::list <EdgePtr_t> Edges_t;
42  Node (const ConfigurationPtr_t& configuration);
46  Node (const ConfigurationPtr_t& configuration,
47  ConnectedComponentPtr_t connectedComponent);
48  void addOutEdge (EdgePtr_t edge);
49  void addInEdge (EdgePtr_t edge);
51  void connectedComponent (const ConnectedComponentPtr_t& cc);
52  ConnectedComponentPtr_t connectedComponent () const;
54  const Edges_t& outEdges () const;
56  const Edges_t& inEdges () const;
60  bool isOutNeighbor (const NodePtr_t& n) const;
64  bool isInNeighbor (const NodePtr_t& n) const;
65 
66  ConfigurationPtr_t configuration () const;
68  std::ostream& print (std::ostream& os) const;
69 
70  virtual ~Node () {};
71 
72  protected:
73  Node() {}
74 
75  private:
76  ConfigurationPtr_t configuration_;
77  Edges_t outEdges_;
78  Edges_t inEdges_;
79  ConnectedComponentPtr_t connectedComponent_;
80 
81  HPP_SERIALIZABLE();
82  }; // class Node
83  std::ostream& operator<< (std::ostream& os, const Node& n);
85  } // namespace core
86 } // namespace hpp
87 #endif // HPP_CORE_NODE_HH
std::list< EdgePtr_t > Edges_t
Definition: node.hh:37
Definition: bi-rrt-planner.hh:24
Definition: edge.hh:35
Definition: node.hh:35
shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:107
pinocchio::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:99
Node()
Definition: node.hh:73
std::list< Edge * > Edges_t
Definition: fwd.hh:127
virtual ~Node()
Definition: node.hh:70
std::ostream & operator<<(std::ostream &os, const Constraint &constraint)
Definition: constraint.hh:101
#define HPP_CORE_DLLAPI
Definition: config.hh:64