Ticket #6962: trac_6962-doctest-fixes.patch

File trac_6962-doctest-fixes.patch, 2.0 KB (added by rlm, 11 years ago)
  • sage/graphs/graph.py

    # HG changeset patch
    # User Robert L. Miller <rlm@rlmiller.org>
    # Date 1261086646 28800
    # Node ID 7d3cec74319d395e7ab08000f5e5e47e81a45d6c
    # Parent  3b53b34d5093c4213f06a8bedd80658cdce0414e
    Fix some optional docests in feedback functions
    
    diff -r 3b53b34d5093 -r 7d3cec74319d sage/graphs/graph.py
    a b  
    1285212852
    1285312853           sage: g = graphs.RandomGNP(5,.3)
    1285412854           sage: dg = DiGraph(g)
    12855            sage: feedback = dg.feedback_edge_set()
     12855           sage: feedback = dg.feedback_edge_set()             # optional - requires GLPK or CBC
    1285612856           sage: (u,v,l) = g.edge_iterator().next()
    12857            sage: (u,v) in feedback or (v,u) in feedback
     12857           sage: (u,v) in feedback or (v,u) in feedback        # optional - requires GLPK or CBC
    1285812858           True
    1285912859        """
    1286012860       
     
    1295212952            sage: dcycle=DiGraph(cycle)
    1295312953            sage: cycle.vertex_cover(value_only=True)         # optional - requires GLPK or CBC
    1295412954            3
    12955             sage: feedback = dcycle.feedback_vertex_set() # optional - requires GLPK or CBC
    12956             sage: feedback.cardinality()
     12955            sage: feedback = dcycle.feedback_vertex_set()     # optional - requires GLPK or CBC
     12956            sage: feedback.cardinality()                      # optional - requires GLPK or CBC
    1295712957            3
    1295812958            sage: (u,v,l) = cycle.edge_iterator().next()
    12959             sage: u in feedback or v in feedback
     12959            sage: u in feedback or v in feedback              # optional - requires GLPK or CBC
     12960            True
    1296012961           
    1296112962        For a circuit, the minimum feedback arc set is clearly `1` ::
    1296212963
    1296312964            sage: circuit = digraphs.Circuit(5)
    12964             sage: circuit.feedback_vertex_set(value_only=True) == 1
     12965            sage: circuit.feedback_vertex_set(value_only=True) == 1    # optional - requires GLPK or CBC
    1296512966            True
    1296612967        """
    1296712968