You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
""" compute_distance(metric::DistanceMetric, x::LongDNA{4}, y::LongDNA{4})::Float32Compute the distance between two `LongDNA{4}` sequences using the specified distance metric."""functioncompute_distance(::NormalizedHammingDistance, x::LongDNA{4}, y::LongDNA{4})::Float32@assertlength(x) ==length(y)
returnmismatches(x, y) /length(x)
end
For the
x =LongDNA{4}(rand("ATGC",30))
y =LongDNA{4}(rand("ATGC",30))
@btimecompute_distance_old($x, $y) # gave 91.649ns (6 allocations: 288 bytes)@btimecompute_distance_old($x, $y) # gave 4.125ns (0 allocations: 0 bytes)
No description provided.
The text was updated successfully, but these errors were encountered: