From 68abfafd298b8435b06080099457c0b5ec23b62d Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 12 Mar 2020 18:36:17 -0500 Subject: [PATCH] introduce evaluate function --- src/AutGroup.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index f8caac3..b6c420e 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -232,6 +232,8 @@ function (F::Automorphism{N})(v::NTuple{N, T}) where {N, T} return v end +evaluate(F::Automorphism{N}) = f(domain(parent(f))) + ############################################################################### # # Comparison @@ -248,7 +250,7 @@ end function hash(g::Automorphism, h::UInt) if g.modified - g_im = reduce!.(g(domain(parent(g)))) + g_im = reduce!.(evaluate(g)) g.savedhash = hash(g, g_im) g.modified = false end @@ -265,8 +267,8 @@ function (==)(g::Automorphism{N}, h::Automorphism{N}) where N end # expensive: - g_im = reduce!.(g(domain(parent(g)))) - h_im = reduce!.(h(domain(parent(h)))) + g_im = reduce!.(evaluate(g)) + h_im = reduce!.(evaluate(h)) # cheap: g.savedhash = hash(g, g_im) g.modified = false