COIN-OR::LEMON - Graph Library

Ticket #283: 283-bf7928412136.patch

File 283-bf7928412136.patch, 1.1 KB (added by Peter Kovacs, 11 years ago)
  • lemon/concepts/graph.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1241879999 -7200
    # Node ID bf7928412136b879be4657e7b921ad67f4aaae99
    # Parent  cb38ccedd2c1335c38de0a85aad55e1feb20f6bf
    Change Graph::Edge -> Graph::Arc inheritance to conversion (#283)
    
    diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h
    a b  
    310310
    311311      /// The directed arc type. It can be converted to the
    312312      /// edge or it should be inherited from the undirected
    313       /// arc.
    314       class Arc : public Edge {
     313      /// edge.
     314      class Arc {
    315315      public:
    316316        /// Default constructor
    317317
     
    322322
    323323        /// Copy constructor.
    324324        ///
    325         Arc(const Arc& e) : Edge(e) { }
     325        Arc(const Arc&) { }
    326326        /// Initialize the iterator to be invalid.
    327327
    328328        /// Initialize the iterator to be invalid.
     
    349349        /// ordering of the items.
    350350        bool operator<(Arc) const { return false; }
    351351
     352        /// Converison to Edge
     353        operator Edge() const { return Edge(); }
    352354      };
    353355      /// This iterator goes through each directed arc.
    354356