src/work/alpar/list_graph.h
changeset 444 618c5d6f36b9
parent 406 e8377ac921b6
child 491 4804c967543d
equal deleted inserted replaced
6:0a69dc3326cc 7:c6921833ab59
   795     template <typename T> class NodeMap;
   795     template <typename T> class NodeMap;
   796     template <typename T> class EdgeMap;
   796     template <typename T> class EdgeMap;
   797     
   797     
   798   public:
   798   public:
   799 
   799 
       
   800     ///Default constructor
   800     NodeSet() : nodes(), first_node(-1),
   801     NodeSet() : nodes(), first_node(-1),
   801 		  first_free_node(-1) {}
   802 		  first_free_node(-1) {}
       
   803     ///Copy constructor
   802     NodeSet(const NodeSet &_g) : nodes(_g.nodes), first_node(_g.first_node),
   804     NodeSet(const NodeSet &_g) : nodes(_g.nodes), first_node(_g.first_node),
   803 				     first_free_node(_g.first_free_node) {}
   805 				     first_free_node(_g.first_free_node) {}
   804     
   806     
   805     ~NodeSet()
   807     ~NodeSet()
   806     {
   808     {
  1213     template <typename T> class NodeMap;
  1215     template <typename T> class NodeMap;
  1214     template <typename T> class EdgeMap;
  1216     template <typename T> class EdgeMap;
  1215     
  1217     
  1216   public:
  1218   public:
  1217 
  1219 
       
  1220     ///Constructor
       
  1221     
       
  1222     ///Construates a new graph based on the nodeset of an existing one.
       
  1223     ///\param _G the base graph.
       
  1224     ///\todo It looks like a copy constructor, but it isn't.
  1218     EdgeSet(NodeGraphType &_G) : G(_G),
  1225     EdgeSet(NodeGraphType &_G) : G(_G),
  1219 				 nodes(_G), edges(),
  1226 				 nodes(_G), edges(),
  1220 				 first_free_edge(-1) { }
  1227 				 first_free_edge(-1) { }
       
  1228     ///Copy constructor
       
  1229 
       
  1230     ///Makes a copy of an EdgeSet.
       
  1231     ///It will be based on the same graph.
  1221     EdgeSet(const EdgeSet &_g) : G(_g.G), nodes(_g.G), edges(_g.edges),
  1232     EdgeSet(const EdgeSet &_g) : G(_g.G), nodes(_g.G), edges(_g.edges),
  1222 				 first_free_edge(_g.first_free_edge) { }
  1233 				 first_free_edge(_g.first_free_edge) { }
  1223     
  1234     
  1224     ~EdgeSet()
  1235     ~EdgeSet()
  1225     {
  1236     {