Skip to content

Commit a6e6bc1

Browse files
authored
Merge pull request #34 from JuliaStats/sjk/method-overwrite
Fix method overwrite warnings
2 parents 8903112 + db6a9bd commit a6e6bc1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/classification.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,17 @@ classify(x::RealMatrix, t::Real) = classify(x, t, Forward)
104104
## label map
105105

106106
immutable LabelMap{K}
107-
vs::Array{K}
107+
vs::Vector{K}
108108
v2i::Dict{K,Int}
109-
end
110109

111-
function LabelMap{K}(vs::Array{K}, v2i::Dict{K,Int})
112-
length(vs) == length(v2i) || throw(DimensionMismatch("Lengths of vs and v2i mismatch"))
113-
LabelMap{K}(vs, v2i)
110+
function LabelMap(vs, v2i)
111+
length(vs) == length(v2i) || throw(DimensionMismatch("lengths of vs and v2i mismatch"))
112+
new(vs, v2i)
113+
end
114114
end
115115

116+
LabelMap{K}(vs::Vector{K}, v2i::Dict{K,Int}) = LabelMap{K}(vs, v2i)
117+
116118
length(lmap::LabelMap) = length(lmap.vs)
117119
keys(lmap::LabelMap) = lmap.vs
118120

src/perfeval.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ immutable BinaryThresPredVec{ScoreVec <: RealVector,
174174
ord::Ord
175175
end
176176

177-
BinaryThresPredVec{SVec<:RealVector,T<:Real,Ord<:Ordering}(scores::SVec, thres::T, ord::Ord) =
178-
BinaryThresPredVec{SVec,T,Ord}(scores, thres, ord)
179-
180177
length(v::BinaryThresPredVec) = length(v.scores)
181178
getindex(v::BinaryThresPredVec, i::Integer) = !lt(v.ord, v.scores[i], v.thres)
182179

0 commit comments

Comments
 (0)