Ticket #14297: trac_14297-rev.patch

File trac_14297-rev.patch, 907 bytes (added by ncohen, 7 years ago)
  • sage/graphs/graph.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1367659262 -7200
    # Node ID 25b72f6a17e812ca59ae9cae045ac318a1cedb5b
    # Parent  42fc049806e06f818f5e389a4fb35d7b357ac370
    is_strongly_regular does not handle complete graphs -- reviewer's patch
    
    diff --git a/sage/graphs/graph.py b/sage/graphs/graph.py
    a b  
    24742474            sage: g.is_strongly_regular()
    24752475            False
    24762476        """
     2477
     2478        if self.size() == 0: # no vertices or no edges
     2479            return False
     2480
    24772481        degree = self.degree()
    2478         if len(degree) == 0: # the empty graph
    2479             return False
    24802482        k = degree[0]
    24812483        if not all(d == k for d in degree):
    24822484            return False
    24832485
    2484         if k == 0: # graphs with no edges
    2485             return False
    2486 
    24872486        if self.is_clique():
    24882487            return False
    24892488        else: