mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 14:35:28 +01:00
introduce evaluate function
This commit is contained in:
parent
6fd89c5a61
commit
68abfafd29
@ -232,6 +232,8 @@ function (F::Automorphism{N})(v::NTuple{N, T}) where {N, T}
|
|||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
evaluate(F::Automorphism{N}) = f(domain(parent(f)))
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Comparison
|
# Comparison
|
||||||
@ -248,7 +250,7 @@ end
|
|||||||
|
|
||||||
function hash(g::Automorphism, h::UInt)
|
function hash(g::Automorphism, h::UInt)
|
||||||
if g.modified
|
if g.modified
|
||||||
g_im = reduce!.(g(domain(parent(g))))
|
g_im = reduce!.(evaluate(g))
|
||||||
g.savedhash = hash(g, g_im)
|
g.savedhash = hash(g, g_im)
|
||||||
g.modified = false
|
g.modified = false
|
||||||
end
|
end
|
||||||
@ -265,8 +267,8 @@ function (==)(g::Automorphism{N}, h::Automorphism{N}) where N
|
|||||||
end
|
end
|
||||||
|
|
||||||
# expensive:
|
# expensive:
|
||||||
g_im = reduce!.(g(domain(parent(g))))
|
g_im = reduce!.(evaluate(g))
|
||||||
h_im = reduce!.(h(domain(parent(h))))
|
h_im = reduce!.(evaluate(h))
|
||||||
# cheap:
|
# cheap:
|
||||||
g.savedhash = hash(g, g_im)
|
g.savedhash = hash(g, g_im)
|
||||||
g.modified = false
|
g.modified = false
|
||||||
|
Loading…
Reference in New Issue
Block a user