self
approximately equal to another PRMap?self
is approximately equal to o
if o
contains all the key from self
with the same values.
Values equality is based on Float::is_approx
with precision
.
# Is `self` approximately equal to another PRMap?
#
# `self` is approximately equal to `o` if `o` contains all the key from `self`
# with the same values.
#
# Values equality is based on `Float::is_approx` with `precision`.
fun is_approx(o: SELF, precision: Float): Bool do
for k1, v1 in self do
if not o.has_key(k1) then return false
if not v1.is_approx(o[k1], precision) then return false
end
return true
end
lib/graph/pagerank.nit:75,2--87,4