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

Commit

Permalink
Make the generators of CoxeterGroup dense.
Browse files Browse the repository at this point in the history
The one() element is dense because the matrix_space() is
dense. By making the generators dense, it means the generators
are not converted to dense matrices upon multiplication,
resulting in a 2x speedup to iteration.
  • Loading branch information
Travis Scrimshaw committed Jan 21, 2016
1 parent 83c6b8d commit 2e9535a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/groups/matrix_gps/coxeter_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ def __init__(self, coxeter_matrix, base_ring, index_set):
for j in range(n)},
coerce=True, copy=True)
for i in range(n)]
# Make the generators dense matrices for consistancy and speed
gens = [g.dense_matrix() for g in gens]
category = CoxeterGroups()
# Now we shall see if the group is finite, and, if so, refine
# the category to ``category.Finite()``. Otherwise the group is
Expand Down

0 comments on commit 2e9535a

Please sign in to comment.