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

Commit

Permalink
Update doctests and error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Aram Dermenjian committed Apr 22, 2017
1 parent f64c494 commit edda1ff
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/sage/categories/coxeter_groups.py
Expand Up @@ -592,11 +592,10 @@ def bruhat_graph(self, x=None, y=None):
if x is None:
x = self.one()
if y is None:
fn = getattr(self, 'long_element', None)
if callable(fn):
if self.is_finite():
y = self.long_element()
else:
raise TypeError("bruhat_graph() requires 2 arguments if the group is infinite")
raise TypeError("infinite groups must specify a maximal element")

g = self.bruhat_interval(x,y)
d = {}
Expand Down Expand Up @@ -1218,6 +1217,19 @@ def reflection_length(self):
.. SEEALSO::
:meth:`absolute_length`
EXAMPLES::
sage: W = WeylGroup(['A',3])
sage: s = W.simple_reflections()
sage: (s[1]*s[2]*s[3]).reflection_length()
3
sage: W = SymmetricGroup(4)
sage: s = W.simple_reflections()
sage: (s[3]*s[2]*s[3]).reflection_length()
1
"""
return self.absolute_length()

Expand Down

0 comments on commit edda1ff

Please sign in to comment.