Update qgram.jl

pull/57/head
matthieugomez 2021-09-26 11:03:45 -04:00
parent b4c99533ec
commit 71b4e42ead
1 changed files with 0 additions and 4 deletions

View File

@ -156,8 +156,6 @@ eval_start(::MorisitaOverlap) = (0, 0, 0, 0, 0)
end
eval_end(::MorisitaOverlap, c::NTuple{5, <:Integer}) = 1 - 2 * c[5] / (c[3] * c[2] / c[1] + c[4] * c[1] / c[2])
#==========================================================================
QGramIterator
==========================================================================#
@ -178,7 +176,6 @@ end
"""
qgrams
struct QGramIterator{S <: Union{AbstractString, AbstractVector}}
s::S # Collection
q::Int # Length of Qgram
@ -205,7 +202,6 @@ Base.eltype(qgram::QGramIterator{SubString{S}}) where {S} = SubString{S}
Base.eltype(qgram::QGramIterator{S}) where {S <: AbstractString} = SubString{S}
qgrams(s::AbstractString, q::Integer) = QGramIterator(s, q)
# q-grams of General Iterators
function Base.iterate(qgram::QGramIterator{<: AbstractVector}, state = firstindex(qgram.s))
state + qgram.q - 1 > lastindex(qgram.s) && return nothing