Explore the performance wall
Three points on two spheres is too much.
This commit is contained in:
parent
31d5e7e864
commit
e41bcc7e13
@ -197,7 +197,8 @@ function realize(ctx::Construction{T}) where T
|
|||||||
push!(eqns, sum(elt.vec[2] for elt in Iterators.flatten((ctx.points, ctx.spheres))) - n_elts)
|
push!(eqns, sum(elt.vec[2] for elt in Iterators.flatten((ctx.points, ctx.spheres))) - n_elts)
|
||||||
end
|
end
|
||||||
|
|
||||||
(Generic.Ideal(coordring, eqns), eqns)
|
## [test] (Generic.Ideal(coordring, eqns), eqns)
|
||||||
|
(nothing, eqns)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
@ -61,21 +61,18 @@ CoeffType = Rational{Int64}
|
|||||||
##freedom = Engine.dimension(ideal_tan_sph)
|
##freedom = Engine.dimension(ideal_tan_sph)
|
||||||
##println("Three mutually tangent spheres: $freedom degrees of freedom")
|
##println("Three mutually tangent spheres: $freedom degrees of freedom")
|
||||||
|
|
||||||
p = Engine.Point{CoeffType}()
|
points = [Engine.Point{CoeffType}() for _ in 1:3]
|
||||||
q = Engine.Point{CoeffType}()
|
spheres = [Engine.Sphere{CoeffType}() for _ in 1:2]
|
||||||
a = Engine.Sphere{CoeffType}()
|
|
||||||
b = Engine.Sphere{CoeffType}()
|
|
||||||
p_on_a = Engine.LiesOn{CoeffType}(p, a)
|
|
||||||
p_on_b = Engine.LiesOn{CoeffType}(p, b)
|
|
||||||
q_on_a = Engine.LiesOn{CoeffType}(q, a)
|
|
||||||
q_on_b = Engine.LiesOn{CoeffType}(q, b)
|
|
||||||
ctx_joined = Engine.Construction{CoeffType}(
|
ctx_joined = Engine.Construction{CoeffType}(
|
||||||
elements = Set([p, q, a, b]),
|
elements = Set([points; spheres]),
|
||||||
relations= Set([p_on_a, p_on_b, q_on_a, q_on_b])
|
relations= Set([
|
||||||
|
Engine.LiesOn{CoeffType}(pt, sph)
|
||||||
|
for pt in points for sph in spheres
|
||||||
|
])
|
||||||
)
|
)
|
||||||
ideal_joined, eqns_joined = Engine.realize(ctx_joined)
|
ideal_joined, eqns_joined = Engine.realize(ctx_joined)
|
||||||
freedom = Engine.dimension(ideal_joined)
|
freedom = Engine.dimension(ideal_joined)
|
||||||
println("Two points on two spheres: $freedom degrees of freedom")
|
println("$(length(points)) points on $(length(spheres)) spheres: $freedom degrees of freedom")
|
||||||
|
|
||||||
# --- test rational cut ---
|
# --- test rational cut ---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user