Skip to content

Commit 2fb35a6

Browse files
committed
corrected typos and indentation
1 parent fcfb917 commit 2fb35a6

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/sage/combinat/integer_vector.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -782,21 +782,26 @@ def __contains__(self, x):
782782

783783
def _unrank_helper(self, x, rtn):
784784
"""
785-
return an element at rank ``x``.
785+
INPUT:
786+
787+
- ``x`` - a nonnegative integer
788+
- ``rtn`` - a list of nonnegative integers
789+
790+
Return the element at rank ``x`` by iterating through all integer vectors beginning with ``rtn``.
786791
787792
EXAMPLES::
788793
789-
sage: i=IntegerVectors(k=5)
790-
sage: i._unrank_helper(10, [2,0,0,0,0])
791-
[1, 0, 0, 0, 1]
794+
sage: IV = IntegerVectors(k=5)
795+
sage: IV._unrank_helper(10, [2,0,0,0,0])
796+
[1, 0, 0, 0, 1]
792797
793-
sage: i=IntegerVectors(n=7)
794-
sage: i._unrank_helper(100, [7,0,0,0])
795-
[2, 0, 0, 5]
798+
sage: IV = IntegerVectors(n=7)
799+
sage: IV._unrank_helper(100, [7,0,0,0])
800+
[2, 0, 0, 5]
796801
797-
sage: i=IntegerVectors(n=12, k=7)
798-
sage: i._unrank_helper(1000, [12,0,0,0,0,0,0])
799-
[5, 3, 1, 1, 1, 1, 0]
802+
sage: IV = IntegerVectors(n=12, k=7)
803+
sage: IV._unrank_helper(1000, [12,0,0,0,0,0,0])
804+
[5, 3, 1, 1, 1, 1, 0]
800805
"""
801806
ptr = 0
802807
while True:

0 commit comments

Comments
 (0)