Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
minor rewrites
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Aug 24, 2016
1 parent 624e6c0 commit 45d9e67
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sage/combinat/k_regular_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def subsequence(self, a, b, minimize=True):
[-4 4 1], [ 12 -12 5], (1, 0, 0), (0, 0, 1)
)
We can build backwards differences by passing a dictionary for
the parameter ``b``::
We can build :meth:`backward_differences` manually by passing
a dictionary for the parameter ``b``::
sage: C.subsequence(1, {0: 1, -1: -1})
2-regular sequence 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
Expand Down Expand Up @@ -473,7 +473,7 @@ def mu_line(r, i, c):
return result


def backward_difference(self, **kwds):
def backward_differences(self, **kwds):
r"""
Return the sequence of backward differences of this
`k`-regular sequence.
Expand All @@ -498,7 +498,7 @@ def backward_difference(self, **kwds):
....: vector([1, 0]), vector([0, 1]))
sage: C
2-regular sequence 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
sage: C.backward_difference()
sage: C.backward_differences()
2-regular sequence 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
::
Expand All @@ -507,13 +507,13 @@ def backward_difference(self, **kwds):
....: vector([1, 0]), vector([1, 1]))
sage: E
2-regular sequence 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...
sage: E.backward_difference()
sage: E.backward_differences()
2-regular sequence 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, ...
"""
return self.subsequence(1, {0: 1, -1: -1}, **kwds)


def forward_difference(self, **kwds):
def forward_differences(self, **kwds):
r"""
Return the sequence of forward differences of this
`k`-regular sequence.
Expand All @@ -534,7 +534,7 @@ def forward_difference(self, **kwds):
....: vector([1, 0]), vector([0, 1]))
sage: C
2-regular sequence 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
sage: C.forward_difference()
sage: C.forward_differences()
2-regular sequence 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
::
Expand All @@ -543,7 +543,7 @@ def forward_difference(self, **kwds):
....: vector([1, 0]), vector([1, 1]))
sage: E
2-regular sequence 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...
sage: E.forward_difference()
sage: E.forward_differences()
2-regular sequence -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, ...
"""
return self.subsequence(1, {1: 1, 0: -1}, **kwds)
Expand Down

0 comments on commit 45d9e67

Please sign in to comment.