lemon/concepts/graph_components.h
changeset 1044 15d7c5eadaca
parent 1027 8b2b9e61d8ce
child 1049 7bf489cf624e
equal deleted inserted replaced
32:0028e4870f8a 33:48e5ad33bfa1
   316       typedef BaseDigraphComponent::Arc Arc;
   316       typedef BaseDigraphComponent::Arc Arc;
   317 
   317 
   318       /// \brief Class to represent red nodes.
   318       /// \brief Class to represent red nodes.
   319       ///
   319       ///
   320       /// This class represents the red nodes of the graph. The red
   320       /// This class represents the red nodes of the graph. The red
   321       /// nodes can be used also as normal nodes.
   321       /// nodes can also be used as normal nodes.
   322       class RedNode : public Node {
   322       class RedNode : public Node {
   323         typedef Node Parent;
   323         typedef Node Parent;
   324 
   324 
   325       public:
   325       public:
   326         /// \brief Default constructor.
   326         /// \brief Default constructor.
   345       };
   345       };
   346 
   346 
   347       /// \brief Class to represent blue nodes.
   347       /// \brief Class to represent blue nodes.
   348       ///
   348       ///
   349       /// This class represents the blue nodes of the graph. The blue
   349       /// This class represents the blue nodes of the graph. The blue
   350       /// nodes can be used also as normal nodes.
   350       /// nodes can also be used as normal nodes.
   351       class BlueNode : public Node {
   351       class BlueNode : public Node {
   352         typedef Node Parent;
   352         typedef Node Parent;
   353 
   353 
   354       public:
   354       public:
   355         /// \brief Default constructor.
   355         /// \brief Default constructor.
   400       /// Gives back the blue end node of the edge.
   400       /// Gives back the blue end node of the edge.
   401       BlueNode blueNode(const Edge&) const { return BlueNode(); }
   401       BlueNode blueNode(const Edge&) const { return BlueNode(); }
   402 
   402 
   403       /// \brief Converts the node to red node object.
   403       /// \brief Converts the node to red node object.
   404       ///
   404       ///
   405       /// This class is converts unsafely the node to red node
   405       /// This function converts unsafely the node to red node
   406       /// object. It should be called only if the node is from the red
   406       /// object. It should be called only if the node is from the red
   407       /// partition or INVALID.
   407       /// partition or INVALID.
   408       RedNode asRedNodeUnsafe(const Node&) const { return RedNode(); }
   408       RedNode asRedNodeUnsafe(const Node&) const { return RedNode(); }
   409 
   409 
   410       /// \brief Converts the node to blue node object.
   410       /// \brief Converts the node to blue node object.
   411       ///
   411       ///
   412       /// This class is converts unsafely the node to blue node
   412       /// This function converts unsafely the node to blue node
   413       /// object. It should be called only if the node is from the red
   413       /// object. It should be called only if the node is from the red
   414       /// partition or INVALID.
   414       /// partition or INVALID.
   415       BlueNode asBlueNodeUnsafe(const Node&) const { return BlueNode(); }
   415       BlueNode asBlueNodeUnsafe(const Node&) const { return BlueNode(); }
   416 
   416 
   417       /// \brief Converts the node to red node object.
   417       /// \brief Converts the node to red node object.
   418       ///
   418       ///
   419       /// This class is converts safely the node to red node
   419       /// This function converts safely the node to red node
   420       /// object. If the node is not from the red partition, then it
   420       /// object. If the node is not from the red partition, then it
   421       /// returns INVALID.
   421       /// returns INVALID.
   422       RedNode asRedNode(const Node&) const { return RedNode(); }
   422       RedNode asRedNode(const Node&) const { return RedNode(); }
   423 
   423 
   424       /// \brief Converts the node to blue node object.
   424       /// \brief Converts the node to blue node object.
   425       ///
   425       ///
   426       /// This class is converts unsafely the node to blue node
   426       /// This function converts unsafely the node to blue node
   427       /// object. If the node is not from the blue partition, then it
   427       /// object. If the node is not from the blue partition, then it
   428       /// returns INVALID.
   428       /// returns INVALID.
   429       BlueNode asBlueNode(const Node&) const { return BlueNode(); }
   429       BlueNode asBlueNode(const Node&) const { return BlueNode(); }
   430 
   430 
   431       template <typename _BpGraph>
   431       template <typename _BpGraph>