From b1420d1988faec0852229599c39f3fcb60f6fa81 Mon Sep 17 00:00:00 2001 From: schillic Date: Wed, 15 May 2019 13:58:49 +0200 Subject: [PATCH] remove redundant to_N --- test/unit_box_approximation.jl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/unit_box_approximation.jl b/test/unit_box_approximation.jl index 0d0c652b2a..2527a509b3 100644 --- a/test/unit_box_approximation.jl +++ b/test/unit_box_approximation.jl @@ -37,31 +37,31 @@ for N in [Float64, Rational{Int}, Float32] # Testing box_approximation_symmetric (= symmetric interval hull) # =================================================================== # Box approximation of a 2D square - b = BallInf(N[1, 1], to_N(N, 0.1)) + b = BallInf(N[1, 1], N(0.1)) h = box_approximation_symmetric(b) - hexp = Hyperrectangle(N[0, 0], to_N(N, [1.1, 1.1])) + hexp = Hyperrectangle(N[0, 0], N[1.1, 1.1]) @test h.center ≈ hexp.center @test h.radius ≈ hexp.radius # Box approximation of a 2D unit ball in the 1-norm - b = Ball1(N[1, -2], to_N(N, 0.2)) + b = Ball1(N[1, -2], N(0.2)) h = box_approximation_symmetric(b) - hexp = Hyperrectangle(N[0, 0], to_N(N, [1.2, 2.2])) + hexp = Hyperrectangle(N[0, 0], N[1.2, 2.2]) @test h.center ≈ hexp.center @test h.radius ≈ hexp.radius # Box approximation of a 3D unit ball in the 1-norm - b = Ball1(N[1, 2, 0], to_N(N, 0.1)) + b = Ball1(N[1, 2, 0], N(0.1)) h = box_approximation_symmetric(b) - hexp = Hyperrectangle(N[0, 0, 0], to_N(N, [1.1, 2.1, 0.1])) + hexp = Hyperrectangle(N[0, 0, 0], N[1.1, 2.1, 0.1]) @test h.center ≈ hexp.center @test h.radius ≈ hexp.radius # Box approximation of a 4D hyperrectangle - b = Hyperrectangle(to_N(N, [-1.5, -2.5, 2.4, -0.4]), - to_N(N, [0.1, 0.2, 0.3, 0.4])) + b = Hyperrectangle(N[-1.5, -2.5, 2.4, -0.4], + N[0.1, 0.2, 0.3, 0.4]) h = box_approximation_symmetric(b) - hexp = Hyperrectangle(zeros(N, 4), to_N(N, [1.6, 2.7, 2.7, 0.8])) + hexp = Hyperrectangle(zeros(N, 4), N[1.6, 2.7, 2.7, 0.8]) @test h.center ≈ hexp.center @test h.radius ≈ hexp.radius