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

Commit

Permalink
A better method to find the minimal length coset representatives.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Scrimshaw committed Jan 2, 2016
1 parent 0b5fcec commit f673aec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sage/categories/weyl_groups.py
Expand Up @@ -160,8 +160,9 @@ def quantum_bruhat_graph(self, index_set=()):
"""
if not self.cartan_type().is_finite():
raise ValueError("the Cartan type {} is not finite".format(self.cartan_type()))
from sage.graphs.digraph import DiGraph
WP = [x for x in self if x == x.coset_representative(index_set)]

# Find all the minimal length coset representatives
WP = [x for x in self if all(not x.has_descent(i) for i in index_set)]

# This is a modified form of quantum_bruhat_successors.
# It does not do any error checking and also is more efficient
Expand Down Expand Up @@ -201,6 +202,7 @@ def succ(x):
successors.append((wrc, alpha))
return successors

from sage.graphs.digraph import DiGraph
return DiGraph([[x,i[0],i[1]] for x in WP for i in succ(x)],
name="Parabolic Quantum Bruhat Graph of %s for nodes %s"%(self, index_set))

Expand Down

0 comments on commit f673aec

Please sign in to comment.