Store elements in arrays to keep order stable
This seems to restore reproducibility.
This commit is contained in:
parent
a6da6f9925
commit
2a505c1f59
@ -120,11 +120,11 @@ equation(rel::AlignsWithBy) = mprod(rel.elements[1].vec, rel.elements[2].vec) -
|
|||||||
# --- constructions ---
|
# --- constructions ---
|
||||||
|
|
||||||
mutable struct Construction{T}
|
mutable struct Construction{T}
|
||||||
points::Set{Point{T}}
|
points::Vector{Point{T}}
|
||||||
spheres::Set{Sphere{T}}
|
spheres::Vector{Sphere{T}}
|
||||||
relations::Set{Relation{T}}
|
relations::Vector{Relation{T}}
|
||||||
|
|
||||||
function Construction{T}(; elements = Set{Element{T}}(), relations = Set{Relation{T}}()) where T
|
function Construction{T}(; elements = Vector{Element{T}}(), relations = Vector{Relation{T}}()) where T
|
||||||
allelements = union(elements, (rel.elements for rel in relations)...)
|
allelements = union(elements, (rel.elements for rel in relations)...)
|
||||||
new{T}(
|
new{T}(
|
||||||
filter(elt -> isa(elt, Point), allelements),
|
filter(elt -> isa(elt, Point), allelements),
|
||||||
|
@ -56,7 +56,7 @@ tangencies = [
|
|||||||
##Engine.LiesOn{CoeffType}(points[3], spheres[1]),
|
##Engine.LiesOn{CoeffType}(points[3], spheres[1]),
|
||||||
##Engine.LiesOn{CoeffType}(points[3], spheres[2])
|
##Engine.LiesOn{CoeffType}(points[3], spheres[2])
|
||||||
##]
|
##]
|
||||||
ctx_tan_sph = Engine.Construction{CoeffType}(elements = Set(spheres), relations = Set(tangencies))
|
ctx_tan_sph = Engine.Construction{CoeffType}(elements = spheres, relations = tangencies)
|
||||||
ideal_tan_sph, eqns_tan_sph = Engine.realize(ctx_tan_sph)
|
ideal_tan_sph, eqns_tan_sph = Engine.realize(ctx_tan_sph)
|
||||||
##small_eqns_tan_sph = eqns_tan_sph
|
##small_eqns_tan_sph = eqns_tan_sph
|
||||||
##small_eqns_tan_sph = [
|
##small_eqns_tan_sph = [
|
||||||
|
Loading…
Reference in New Issue
Block a user