Skip to content

Commit f459fc7

Browse files
fix print override
1 parent d1cd796 commit f459fc7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/benchmark.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,37 +94,37 @@ function ShootoutSet(probs,setups;probaux=nothing,numruns=20,
9494
return ShootoutSet(shootouts,probs,probaux,N,winners)
9595
end
9696

97-
length(shoot::Shootout) = shoot.N
97+
Base.length(shoot::Shootout) = shoot.N
9898
Base.size(shoot::Shootout) = length(shoot)
9999
Base.endof(shoot::Shootout) = length(shoot)
100100
Base.getindex(shoot::Shootout,i::Int) = shoot.effs[i]
101101
Base.getindex(shoot::Shootout,::Colon) = shoot.effs
102102

103-
function print(io::IO, shoot::Shootout)
103+
function Base.print(io::IO, shoot::Shootout)
104104
println(io,"Names: $(shoot.names), Winner: $(shoot.winner)")
105105
println(io,"Efficiencies: $(shoot.effs)")
106106
println(io,"EffRatios: $(shoot.effratios[shoot.bestidx,:])")
107107
println(io,"Times: $(shoot.times)")
108108
println(io,"Errors: $(shoot.errors)")
109109
end
110110

111-
function show(io::IO, shoot::Shootout)
111+
function Base.show(io::IO, shoot::Shootout)
112112
println(io,"Winner: $(shoot.winner)")
113113
println(io,"EffRatios: $(shoot.effratios[shoot.bestidx,:])")
114114
end
115115

116-
length(set::ShootoutSet) = set.N
116+
Base.length(set::ShootoutSet) = set.N
117117
Base.size(set::ShootoutSet) = length(set)
118118
Base.endof(set::ShootoutSet) = length(set)
119119
Base.getindex(set::ShootoutSet,i::Int) = set.shootouts[i]
120120
Base.getindex(set::ShootoutSet,::Colon) = set.shootouts
121121

122-
function print(io::IO, set::ShootoutSet)
122+
function Base.print(io::IO, set::ShootoutSet)
123123
println(io,"ShootoutSet of $(set.N) shootouts")
124124
println(io,"Winners: $(set.winners)")
125125
end
126126

127-
function show(io::IO, set::ShootoutSet)
127+
function Base.show(io::IO, set::ShootoutSet)
128128
println(io,"ShootoutSet of $(set.N) shootouts ")
129129
end
130130

@@ -312,35 +312,35 @@ function WorkPrecisionSet(prob,abstols,reltols,setups;numruns=20,
312312
return WorkPrecisionSet(wps,N,abstols,reltols,prob,setups,names)
313313
end
314314

315-
length(wp::WorkPrecision) = wp.N
315+
Base.length(wp::WorkPrecision) = wp.N
316316
Base.size(wp::WorkPrecision) = length(wp)
317317
Base.endof(wp::WorkPrecision) = length(wp)
318318
Base.getindex(wp::WorkPrecision,i::Int) = wp.times[i]
319319
Base.getindex(wp::WorkPrecision,::Colon) = wp.times
320320

321-
function print(io::IO, wp::WorkPrecision)
321+
function Base.print(io::IO, wp::WorkPrecision)
322322
println(io,"Name: $(wp.name)")
323323
println(io,"Times: $(wp.times)")
324324
println(io,"Errors: $(wp.errors)")
325325
end
326326

327-
function show(io::IO, wp::WorkPrecision)
327+
function Base.show(io::IO, wp::WorkPrecision)
328328
println(io,"Name: $(wp.name)")
329329
println(io,"Times: $(wp.times)")
330330
println(io,"Errors: $(wp.errors)")
331331
end
332332

333-
length(wp_set::WorkPrecisionSet) = wp_set.N
333+
Base.length(wp_set::WorkPrecisionSet) = wp_set.N
334334
Base.size(wp_set::WorkPrecisionSet) = length(wp_set)
335335
Base.endof(wp_set::WorkPrecisionSet) = length(wp_set)
336336
Base.getindex(wp_set::WorkPrecisionSet,i::Int) = wp_set.wps[i]
337337
Base.getindex(wp_set::WorkPrecisionSet,::Colon) = wp_set.wps
338338

339-
function print(io::IO, wp_set::WorkPrecisionSet)
339+
function Base.print(io::IO, wp_set::WorkPrecisionSet)
340340
println(io,"WorkPrecisionSet of $(wp_set.N) wps")
341341
println(io,"Names: $(wp_set.names)")
342342
end
343343

344-
function show(io::IO, wp_set::WorkPrecisionSet)
344+
function Base.show(io::IO, wp_set::WorkPrecisionSet)
345345
println(io,"WorkPrecisionSet of $(wp_set.N) wps")
346346
end

0 commit comments

Comments
 (0)