Skip to content

Commit 113d2d9

Browse files
committed
Address Felix comment
1 parent bc24677 commit 113d2d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/LieTheory/WeylGroup.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,11 @@ function reflection(beta::RootSpaceElem)
526526
W = weyl_group(R)
527527
rk = number_of_simple_roots(R)
528528

529-
b, index_of_beta = is_positive_root_with_index(beta)
530-
if !b
531-
b, index_of_beta = is_negative_root_with_index(beta)
532-
end
529+
b, index_of_beta = is_root_with_index(beta)
533530
@req b "Not a root"
531+
if index_of_beta > rk # for a negative root we want the index of the corresponding positive root
532+
index_of_beta -= rk
533+
end
534534

535535
found_simple_root = index_of_beta <= rk
536536
current_index = index_of_beta

0 commit comments

Comments
 (0)