Skip to content

ambiguity patches - #33

Open
johnnychen94 wants to merge 5 commits into
JuliaImages:masterfrom
johnnychen94:ambiguity
Open

ambiguity patches#33
johnnychen94 wants to merge 5 commits into
JuliaImages:masterfrom
johnnychen94:ambiguity

Conversation

@johnnychen94

@johnnychen94 johnnychen94 commented Aug 16, 2019

Copy link
Copy Markdown
Member

Before this patch there're 32 ambiguities, of which:

  • ✅ 29 belong to result_type for metrics that are not yet tested and imported by ImageDistances.
  • ✅ 1 belong to colwise! for WeightEuclidean that can be solved with one method definition.
  • ❌ 2 belong to colwise! for SqMahalanobis and Mahalanobisat that can't be solved easily (at least in this repo).

Details of ❌ : it should be r::AbstractVector for these two methods in the upstream Distances.jl. cc: @nalimilan

julia> using ImageDistances, Distances, Test

julia> foreach(enumerate(detect_ambiguities(Distances, ImageDistances))) do (i, x)
              println("No.", i, ":")
              println("    ", x[1])
              println("    ", x[2])
              println()
       end
No.1:
    colwise!(r::AbstractArray, dist::SqMahalanobis{T}, a::AbstractArray{T,2} where T, b::AbstractArray{T,2} where T) where T<:Real in Distances at /Users/jc/.julia/packages/Distances/KqP84/src/mahalanobis.jl:29
    colwise!(r::AbstractArray{T,1} where T, dist::PreMetric, a::AbstractArray{#s15,2} where #s15<:(AbstractArray{T,N} where N where T<:Union{Number, ColorTypes.Colorant}), b::AbstractArray{#s14,2} where #s14<:(AbstractArray{T,N} where N where T<:Union{Number, ColorTypes.Colorant})) in ImageDistances at /Users/jc/Documents/Julia/ImageDistances.jl/src/generic.jl:17

No.2:
    colwise!(r::AbstractArray, dist::Mahalanobis{T}, a::AbstractArray{T,2} where T, b::AbstractArray{T,2} where T) where T<:Real in Distances at /Users/jc/.julia/packages/Distances/KqP84/src/mahalanobis.jl:93
    colwise!(r::AbstractArray{T,1} where T, dist::PreMetric, a::AbstractArray{#s15,2} where #s15<:(AbstractArray{T,N} where N where T<:Union{Number, ColorTypes.Colorant}), b::AbstractArray{#s14,2} where #s14<:(AbstractArray{T,N} where N where T<:Union{Number, ColorTypes.Colorant})) in ImageDistances at /Users/jc/Documents/Julia/ImageDistances.jl/src/generic.jl:17

@codecov

codecov Bot commented Aug 16, 2019

Copy link
Copy Markdown

Codecov Report

Merging #33 into master will decrease coverage by 7.77%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
- Coverage   87.61%   79.83%   -7.78%     
==========================================
  Files           6        6              
  Lines         113      124      +11     
==========================================
  Hits           99       99              
- Misses         14       25      +11
Impacted Files Coverage Δ
src/metrics_distances.jl 26.66% <0%> (-73.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93c489f...263972c. Read the comment docs.

@codecov

codecov Bot commented Aug 16, 2019

Copy link
Copy Markdown

Codecov Report

Merging #33 into master will decrease coverage by 3.71%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
- Coverage   87.61%   83.89%   -3.72%     
==========================================
  Files           6        6              
  Lines         113      118       +5     
==========================================
  Hits           99       99              
- Misses         14       19       +5
Impacted Files Coverage Δ
src/metrics_distances.jl 44.44% <16.66%> (-55.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93c489f...e89364f. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant