hpp-core  4.9.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 
26 namespace hpp {
27  namespace core {
30 
34  class HPP_CORE_DLLAPI Node {
35  public:
36  typedef std::list <EdgePtr_t> Edges_t;
41  Node (const ConfigurationPtr_t& configuration);
45  Node (const ConfigurationPtr_t& configuration,
46  ConnectedComponentPtr_t connectedComponent);
47  void addOutEdge (EdgePtr_t edge);
48  void addInEdge (EdgePtr_t edge);
50  void connectedComponent (const ConnectedComponentPtr_t& cc);
51  ConnectedComponentPtr_t connectedComponent () const;
53  const Edges_t& outEdges () const;
55  const Edges_t& inEdges () const;
59  bool isOutNeighbor (const NodePtr_t& n) const;
63  bool isInNeighbor (const NodePtr_t& n) const;
64 
65  ConfigurationPtr_t configuration () const;
67  std::ostream& print (std::ostream& os) const;
68 
69  virtual ~Node () {};
70  private:
71  ConfigurationPtr_t configuration_;
72  Edges_t outEdges_;
73  Edges_t inEdges_;
74  ConnectedComponentPtr_t connectedComponent_;
75  }; // class Node
76  std::ostream& operator<< (std::ostream& os, const Node& n);
78  } // namespace core
79 } // namespace hpp
80 #endif // HPP_CORE_NODE_HH
Vec3f n
std::list< EdgePtr_t > Edges_t
Definition: node.hh:36
Definition: edge.hh:34
boost::shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:107
Definition: node.hh:34
pinocchio::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:99
virtual ~Node()
Definition: node.hh:69
std::ostream & operator<<(std::ostream &os, const Constraint &constraint)
Definition: constraint.hh:98