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

Commit

Permalink
added cached methods to number of reflections/hyperplanes and rank
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpc5 committed Jul 6, 2016
1 parent 35a98d7 commit 250aaee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sage/categories/finite_complex_reflection_groups.py
Expand Up @@ -293,6 +293,7 @@ def _test_codegrees(self, **options):
self.number_of_reflection_hyperplanes(),
"the sum of the codegrees should be consistent with the number of reflection hyperplanes")

@cached_method
def number_of_reflection_hyperplanes(self):
r"""
Return the number of reflection hyperplanes of ``self``.
Expand Down Expand Up @@ -324,6 +325,7 @@ def number_of_reflection_hyperplanes(self):
from sage.rings.all import ZZ
return ZZ.sum(codeg+1 for codeg in self.codegrees())

@cached_method
def number_of_reflections(self):
r"""
Return the number of reflections of ``self``.
Expand Down Expand Up @@ -357,6 +359,7 @@ def number_of_reflections(self):
from sage.rings.all import ZZ
return ZZ.sum(deg-1 for deg in self.degrees())

@cached_method
def rank(self):
r"""
Return the rank of ``self``.
Expand Down

0 comments on commit 250aaee

Please sign in to comment.