Skip to content

Commit bc61aa2

Browse files
committed
Upgrade to MultivariateMoments v0.1.0
1 parent 0a9c470 commit bc61aa2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
julia 0.6
22
MultivariatePolynomials 0.1.1
33
SemialgebraicSets 0.0.2
4-
MultivariateMoments
4+
MultivariateMoments 0.1.0
55
JuMP
66
PolyJuMP 0.1.0

test/extract_domain_polyopt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ using MultivariateMoments
3131
@test isnull(atoms) == !found
3232
if !isnull(atoms)
3333
η = get(atoms)
34-
@test η.λ[1] 1/2 atol=1e-2
35-
@test η.λ[2] 1/2 atol=1e-2
36-
@test isapprox.support[1], [0, 1], atol=1e-2) || isapprox.support[1], [1, 0], atol=1e-2)
37-
@test isapprox.support[2], [0, 1], atol=1e-2) || isapprox.support[2], [1, 0], atol=1e-2)
34+
@test η.atoms[1].weight 1/2 atol=1e-2
35+
@test η.atoms[2].weight 1/2 atol=1e-2
36+
@test isapprox.atoms[1].center, [0, 1], atol=1e-2) || isapprox.atoms[1].center, [1, 0], atol=1e-2)
37+
@test isapprox.atoms[2].center, [0, 1], atol=1e-2) || isapprox.atoms[2].center, [1, 0], atol=1e-2)
3838
end
3939
end
4040
end

test/options_pricing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ using MultivariateMoments
1010
@polyvar x y z
1111
σ = [184.04, 164.88, 164.88, 184.04, 164.88, 184.04]
1212
X = [x^2, x*y, x*z, y^2, y*z, z^2, x, y, z, 1]
13-
μ = MultivariateMoments.measure([σ + 44.21^2; 44.21 * ones(3); 1],
14-
X)
13+
μ = measure([σ + 44.21^2; 44.21 * ones(3); 1],
14+
X)
1515
function optionspricing(K, cone)
1616
m = SOSModel(solver = solver)
1717
@variable m p Poly(X)

0 commit comments

Comments
 (0)