mirror of
https://github.com/MillironX/SequenceVariation.jl.git
synced 2024-11-22 21:39:55 +00:00
Merge pull request #10 from MillironX/feature/variation-equality
This commit is contained in:
commit
538b612faf
1 changed files with 2 additions and 0 deletions
|
@ -356,6 +356,8 @@ reference(v::Variation) = v.reference
|
||||||
edit(v::Variation) = v.edit
|
edit(v::Variation) = v.edit
|
||||||
mutation(v::Variation) = mutation(edit(v))
|
mutation(v::Variation) = mutation(edit(v))
|
||||||
BioGenerics.leftposition(v::Variation) = leftposition(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)
|
function is_valid(v::Variation)
|
||||||
isempty(v.ref) && return false
|
isempty(v.ref) && return false
|
||||||
|
|
Loading…
Reference in a new issue