COIN-OR::LEMON - Graph Library

Ticket #3: smart_itemcount_a7e8ad460d66.patch

File smart_itemcount_a7e8ad460d66.patch, 794 bytes (added by Peter Kovacs, 16 years ago)
  • lemon/smart_graph.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1225992938 -3600
    # Node ID a7e8ad460d6648e3f188f15e2aaaeaae7ab2c6b6
    # Parent  efbd0ab50a774de69ec772748d18ab5d56bc233a
    Add missing tags and functions for item counting in SmartGraph (#3)
    
    diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h
    a b  
    480480    SmartGraphBase()
    481481      : nodes(), arcs() {}
    482482
     483    typedef True NodeNumTag;
     484    typedef True EdgeNumTag;
     485    typedef True ArcNumTag;
     486
     487    int nodeNum() const { return nodes.size(); }
     488    int edgeNum() const { return arcs.size() / 2; }
     489    int arcNum() const { return arcs.size(); }
    483490
    484491    int maxNodeId() const { return nodes.size()-1; }
    485492    int maxEdgeId() const { return arcs.size() / 2 - 1; }