Ticket #5793: trac_5793-part-6.patch

File trac_5793-part-6.patch, 1.6 KB (added by rlm, 11 years ago)

Apply on top of flattened patch

  • sage/graphs/graph_coloring.py

    # HG changeset patch
    # User Robert L. Miller <rlm@rlmiller.org>
    # Date 1248370612 25200
    # Node ID ce14c6b781cdd806f3016317c79e4ac17d9b2559
    # Parent  d53ecc5ac0e1c894334339615a56bafd9cfcfc52
    Doctest fixes
    
    diff -r d53ecc5ac0e1 -r ce14c6b781cd sage/graphs/graph_coloring.py
    a b  
    221221    elif G.is_bipartite(): #can we do it in linear time?
    222222        return 2
    223223    else: #counting cliques is faster than our brute-force method...
    224         m = max([len(c) for c in G.cliques()])
     224        m = G.clique_number()
    225225    if m >= o-1: #marginal improvement... if there's an o-1 clique and not an o clique, don't waste our time coloring.
    226226        return m
    227227    for n in range(m,o+1):
  • sage/groups/perm_gps/partn_ref/refinement_graphs.pyx

    diff -r d53ecc5ac0e1 -r ce14c6b781cd sage/groups/perm_gps/partn_ref/refinement_graphs.pyx
    a b  
    315315
    316316    This example is due to Chris Godsil:
    317317        sage: HS = graphs.HoffmanSingletonGraph()
    318         sage: clqs = (HS.complement()).cliques()
    319         sage: alqs = [Set(c) for c in clqs if len(c) == 15]
     318        sage: alqs = [Set(c) for c in (HS.complement()).cliques_maximum()]
    320319        sage: Y = Graph([alqs, lambda s,t: len(s.intersection(t))==0])
    321320        sage: Y0,Y1 = Y.connected_components_subgraphs()
    322321        sage: st(Y0, [Y0.vertices()])[1] == st(Y1, [Y1.vertices()])[1]