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

Commit

Permalink
style changes as mentioned by gh-kliem in 32681
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisJahn committed Oct 25, 2021
1 parent b9692a6 commit 898ddd7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/sage/combinat/root_system/reflection_group_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def simple_root_index(self, i):
"""
return self._index_set_inverse[i]

def bruhat_cone(self, x, y, side = 'upper'):
def bruhat_cone(self, x, y, side='upper', backend='cdd'):
r"""
Return the polyhedral cone generated by the set of positive roots ``beta`` where ``s_beta`` is the reflection corresponding to ``beta`` and:
Expand All @@ -721,6 +721,8 @@ def bruhat_cone(self, x, y, side = 'upper'):
* ``'upper'`` - roots of reflections corresponding to atoms in the interval [``x``, ``y``]
* ``'lower'`` - roots of reflections corresponding to coatoms in the interval [``x``, ``y``]
- ``backend`` -- string (default: ``'ccd'``) -- The backend to use to create the polyhedron.
EXAMPLES::
Expand All @@ -744,12 +746,15 @@ def bruhat_cone(self, x, y, side = 'upper'):
raise ValueError("side must be either 'upper' or 'lower'")
from sage.geometry.polyhedron.constructor import Polyhedron
if self.is_crystallographic():
return Polyhedron(vertices = [[0]*self.rank()], rays = roots, ambient_dim = self.rank())
return Polyhedron(vertices = [[0]*self.rank()], rays=roots, ambient_dim=self.rank(), backend=backend)
else:
from warnings import warn
warn("Using floating point numbers for roots of unity. This might cause numerical errors!")
from sage.rings.real_double import RDF
return Polyhedron(vertices = [[0]*self.rank()], rays = roots, ambient_dim = self.rank(), base_ring = RDF)
if backend == 'cdd':
from warnings import warn
warn("Using floating point numbers for roots of unity. This might cause numerical errors!")
from sage.rings.real_double import RDF as base_ring
else:
from sage.rings.qqbar import AA as base_ring
return Polyhedron(vertices = [[0]*self.rank()], rays=roots, ambient_dim=self.rank(), base_ring=base_ring, backend=backend)

class Element(RealReflectionGroupElement, ComplexReflectionGroup.Element):

Expand Down

0 comments on commit 898ddd7

Please sign in to comment.