From a1ebf530f4091c2211321b28f04889c4cb09e060 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Wed, 25 Mar 2020 00:47:45 +0100 Subject: [PATCH] in automoprhism evaluation no need to freereduce! Symbols already do so, where appropriate --- src/AutGroup.jl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index 7838011..18c7af7 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -217,20 +217,16 @@ end # ############################################################################### -function (s::AutSymbol)(v::NTuple{N, T}) where {N, T} - if s.pow != 0 - v = s.fn(v, s.pow)::NTuple{N, T} - end - return v -end +(s::AutSymbol)(v::NTuple{N, T}) where {N, T} = s.fn(v, s.pow)::NTuple{N, T} function (f::Automorphism{N})(v::NTuple{N, T}) where {N, T} - for (i, s) in enumerate(f.symbols) + for s in syllables(f) v = s(v)::NTuple{N, T} - if i % 5 == 0 - freereduce!.(v) - end + # if iszero(i % 3) + # freereduce!.(v) + # end end + # return freereduce!.(v) return v end