Store elements in arrays to keep order stable

This seems to restore reproducibility.
This commit is contained in:
Aaron Fenyes 2024-02-15 14:27:41 -08:00
parent 291d5c8ff6
commit 8d8bc9162c
2 changed files with 5 additions and 5 deletions

View file

@ -120,11 +120,11 @@ equation(rel::AlignsWithBy) = mprod(rel.elements[1].vec, rel.elements[2].vec) -
# --- constructions ---
mutable struct Construction{T}
points::Set{Point{T}}
spheres::Set{Sphere{T}}
relations::Set{Relation{T}}
points::Vector{Point{T}}
spheres::Vector{Sphere{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)...)
new{T}(
filter(elt -> isa(elt, Point), allelements),