Define JetSpace equality#418
Conversation
| """ | ||
| function set_default_space!(space::JetSpace; nowarn::Bool=false) | ||
| old_space = default_space[] | ||
| old_space === space && return space |
There was a problem hiding this comment.
| old_space === space && return space |
This line is now redundant.
| name = "TaylorSeries" | ||
| uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" | ||
| version = "0.22.1" | ||
| version = "0.22.2" |
There was a problem hiding this comment.
Not sure this qualifies as a patch version. It changes the behavior.
|
Sorry, while this is helpful, it is not solving all of my issues. julia> cp
33.0
julia> cq
33.0
julia> cp.space
JetSpace
Expansion order: 3
Number of variables: 3
Variable names: ["x₁", "x₂", "x₃"]
Variable symbols: [:x₁, :x₂, :x₃]
julia> cq.space
JetSpace
Expansion order: 3
Number of variables: 5
Variable names: ["x₁", "x₂", "x₃", "x₄", "x₅"]
Variable symbols: [:x₁, :x₂, :x₃, :x₄, :x₅]
julia> cp == cq
falseI understand that this is much more intricate to implement. So would it be possible to provide a function (again, it does not have to be |
My naive guess to answer this question is that |
This PR is an attempt to fix #417:
JetSpace==and matching hash. By structural I mean comparing order, number of variables, variable names, and symbols, not caches/locks.TaylorNandHomogeneousPolynomialequality to usespace(a) == space(b)._check_same_space, so mixed-space operations still throw.set_default_space!to keep and return the existing default object when the incoming space is structurally equal.variables!to reuse the existing default space instead of constructing/replacing an equivalent one.cc: @lbenet @schillic