Skip to content

Commit 31f4fa6

Browse files
committed
suggested details
1 parent 457b6a8 commit 31f4fa6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/sage/combinat/debruijn_sequence.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class DeBruijnSequences(UniqueRepresentation, Parent):
264264
265265
TESTS:
266266
267-
Setting ``n`` orr ``k`` to anything under 1 will return
267+
Setting ``n`` or ``k`` to anything under 1 will return
268268
a :class:`ValueError`::
269269
270270
sage: DeBruijnSequences(3, 0).an_element()

src/sage/combinat/degree_sequences.pyx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,16 @@ class DegreeSequences:
308308
sage: DegreeSequences(-1)
309309
Traceback (most recent call last):
310310
...
311-
ValueError: The input parameter must be >= 0.
311+
ValueError: the input parameter must be >= 0
312312
"""
313313
if n < 0:
314-
raise ValueError("The input parameter must be >= 0.")
314+
raise ValueError("the input parameter must be >= 0")
315315
self._n = n
316316

317317
def __contains__(self, seq):
318318
"""
319-
Checks whether a given integer sequence is the degree sequence
320-
of a graph on `n` elements
319+
Check whether a given integer sequence is the degree sequence
320+
of a graph on `n` elements.
321321
322322
EXAMPLES::
323323
@@ -343,7 +343,7 @@ class DegreeSequences:
343343
[[0]]
344344
"""
345345
cdef int n = self._n
346-
if len(seq)!=n:
346+
if len(seq) != n:
347347
return False
348348

349349
# Is the sum even ?
@@ -371,9 +371,9 @@ class DegreeSequences:
371371
partial += d
372372

373373
# Evaluating the right hand side
374-
right = i*(i+1)
375-
for dd in seq[i+1:]:
376-
right += min(dd, i+1)
374+
right = i * (i + 1)
375+
for dd in seq[i + 1:]:
376+
right += min(dd, i + 1)
377377

378378
# Comparing the two
379379
if partial > right:

0 commit comments

Comments
 (0)