mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-25 22:59:56 +00:00
Add hash function for Variation
This commit is contained in:
parent
70965732cf
commit
fe1bbcc0f3
1 changed files with 1 additions and 0 deletions
|
@ -357,6 +357,7 @@ edit(v::Variation) = v.edit
|
|||
mutation(v::Variation) = mutation(edit(v))
|
||||
BioGenerics.leftposition(v::Variation) = leftposition(edit(v))
|
||||
Base.:(==)(x::Variation, y::Variation) = x.ref == y.ref && x.edit == y.edit
|
||||
Base.hash(x::Variation, h::UInt) = hash(Variation, hash((x.ref, x.edit), h))
|
||||
|
||||
function is_valid(v::Variation)
|
||||
isempty(v.ref) && return false
|
||||
|
|
Loading…
Reference in a new issue