Ticket #10756: trac_10756.patch

File trac_10756.patch, 791 bytes (added by ncohen, 10 years ago)
  • sage/graphs/cliquer.pyx

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1297179584 -3600
    # Node ID 1cc1229828ba206800dcbd241f22e2826935604d
    # Parent  9d9a771f10adb0485b5b03b8c027371dac7a2b1f
    trac 10756 - Cliquer does not like empty graphs
    
    diff -r 9d9a771f10ad -r 1cc1229828ba sage/graphs/cliquer.pyx
    a b  
    1919          sage: C=graphs.PetersenGraph()
    2020          sage: max_clique(C)
    2121          [7, 9]
     22
     23    TEST::
     24
     25        sage: g = Graph()
     26        sage: g.clique_maximum()
     27        []
    2228    """
     29    if graph.order() == 0:
     30        return graph.vertices()
     31
    2332    graph,d = graph.relabel(inplace=False, return_map=True)
    2433    d_inv = {}
    2534    for v in d: