COIN-OR::LEMON - Graph Library

Changeset 2111:ea1fa1bc3f6d in lemon-0.x for lemon/concept/bpugraph.h


Ignore:
Timestamp:
06/28/06 17:06:24 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2817
Message:

Removing concepts for extendable and erasable graphs
Renaming StaticGraph? to Graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concept/bpugraph.h

    r1993 r2111  
    948948    };
    949949
    950     /// \brief An empty non-static undirected graph class.
    951     ///   
    952     /// This class provides everything that \ref BpUGraph does.
    953     /// Additionally it enables building graphs from scratch.
    954     class ExtendableBpUGraph : public BpUGraph {
    955     public:
    956      
    957       /// \brief Add a new ANode to the graph.
    958       ///
    959       /// Add a new ANode to the graph.
    960       /// \return the new node.
    961       Node addANode();
    962 
    963       /// \brief Add a new ANode to the graph.
    964       ///
    965       /// Add a new ANode to the graph.
    966       /// \return the new node.
    967       Node addBNode();
    968 
    969       /// \brief Add a new undirected edge to the graph.
    970       ///
    971       /// Add a new undirected edge to the graph. One of the nodes
    972       /// should be ANode and the other should be BNode.
    973       /// \pre The nodes are not in the same nodeset.
    974       /// \return the new edge.
    975       UEdge addEdge(const Node& from, const Node& to);
    976 
    977       /// \brief Resets the graph.
    978       ///
    979       /// This function deletes all undirected edges and nodes of the graph.
    980       /// It also frees the memory allocated to store them.
    981       void clear() { }
    982 
    983       template <typename Graph>
    984       struct Constraints {
    985         void constraints() {}
    986       };
    987 
    988     };
    989 
    990     /// \brief An empty erasable undirected graph class.
    991     ///
    992     /// This class is an extension of \ref ExtendableBpUGraph. It makes it
    993     /// possible to erase undirected edges or nodes.
    994     class ErasableBpUGraph : public ExtendableBpUGraph {
    995     public:
    996 
    997       /// \brief Deletes a node.
    998       ///
    999       /// Deletes a node.
    1000       ///
    1001       void erase(Node) { }
    1002       /// \brief Deletes an undirected edge.
    1003       ///
    1004       /// Deletes an undirected edge.
    1005       ///
    1006       void erase(UEdge) { }
    1007 
    1008       template <typename Graph>
    1009       struct Constraints {
    1010         void constraints() {}
    1011       };
    1012 
    1013     };
    1014950
    1015951    /// @}
Note: See TracChangeset for help on using the changeset viewer.