Closed andresrossb closed 3 years ago
I checked and it seems this is already defined in states.jl
:
isapprox(X1::TX, X2::TX, args...; kwargs...
) where {TX <: XState{SYMS}} where {SYMS} =
all( isapprox( getproperty(_x(X1), sym), getproperty(_x(X2), sym),
args...; kwargs...) for sym in SYMS )
Not sure why it isn't working as expected. Maybe isapprox
and ≈ are different?
I tried again using ≈ and it worked fine. It must have been a small bug with the returns. It works fine now.
that's great.
For testing purposes we want to compare weather or not two states are equivalent. Then we want to overload isapprox such that for two states or DStates A and B we could simply test them by using: A ≈ B.