File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,33 @@ Base.@kwdef struct HypoRecipeCompute{
18
18
certainhypo:: CH = nothing
19
19
""" subsection indices to select which params should be used for this hypothesis evaluation """
20
20
activehypo:: Vector{Int} = Int[]
21
- end
21
+ end
22
+
23
+
24
+ function Base. isapprox (
25
+ a:: HypoRecipe ,
26
+ b:: HypoRecipe
27
+ )
28
+ if ! (isnothing (a. hypotheses) && isnothing (B. hypotheses))
29
+ return isapprox (a. hypotheses. p, b. hypotheses. p)
30
+ end
31
+ if ! (isnothing (a. certainhypo) && isnothing (B. certainhypo))
32
+ return isapprox (a. certainhypo, b. certainhypo)
33
+ end
34
+
35
+ if 0 < length (a. activehypo)
36
+ if length (a. activehypo) == length (b. activehypo)
37
+ return isapprox (a. activehypo, b. activehypo)
38
+ else
39
+ return false
40
+ end
41
+ end
42
+
43
+ return true
44
+ end
45
+
46
+
47
+ Base.== (
48
+ a:: HypoRecipe ,
49
+ b:: HypoRecipe
50
+ ) = isapprox (a,b)
You can’t perform that action at this time.
0 commit comments