Skip to content

Commit 5985431

Browse files
committed
Rel 0.1.3
1 parent a04d7c2 commit 5985431

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/StructuralCausalModels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ ModelDefinition = Union{OrderedDict, AbstractString, NamedArray}
5858

5959
include("types/DAG.jl")
6060
include("types/Path.jl")
61-
include("types/ConditionalIndependence.jl")
6261
include("types/BasisSet.jl")
62+
include("types/ConditionalIndependence.jl")
6363

6464
include("methods/dag_methods.jl")
6565
include("methods/basis_set.jl")

src/types/ConditionalIndependence.jl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ end
1919

2020
import Base.print
2121
function print(io::IO, x::BasisSet)
22-
println(bs.bs)
22+
str = ""
23+
str *= "BasisSet["
24+
for c in bs.bs
25+
ci = ConditionalIndependency(c)
26+
if isnothing(ci.c)
27+
str *= " :$(ci.f) \u2210 :$(ci.s)"
28+
else
29+
str *= " :$(ci.f) \u2210 :$(ci.s) | $(ci.c)"
30+
end
31+
end
32+
str *= " ]"
33+
str
34+
end
35+
36+
function pluto_string(bs::BasisSet)
2337
str = ""
2438
str *= "BasisSet["
2539
for c in bs.bs
@@ -45,4 +59,6 @@ end
4559
show(io::IO, ci::ConditionalIndependency) = ci_show(io, ci)
4660

4761
export
48-
ConditionalIndependency
62+
ConditionalIndependency,
63+
print,
64+
pluto_string

0 commit comments

Comments
 (0)