diff --git a/src/structured_prob_nodes.jl b/src/structured_prob_nodes.jl index 209632a2..f20eb74d 100644 --- a/src/structured_prob_nodes.jl +++ b/src/structured_prob_nodes.jl @@ -135,7 +135,7 @@ function compile(::Type{<:StructProbCircuit}, vtree::Vtree, circuit::LogicCircui foldup_aggregate(circuit, f_con, f_lit, f_a, f_o, StructProbCircuit) end -function Base.convert(::Type{<:StructProbCircuit}, sdd::Sdd)::StructProbCircuit +function compile(::Type{<:StructProbCircuit}, sdd::Sdd)::StructProbCircuit lc = LogicCircuit(sdd) plc = propagate_constants(lc, remove_unary=true) structplc = compile(StructLogicCircuit, vtree(sdd), plc) diff --git a/test/structured_prob_nodes_tests.jl b/test/structured_prob_nodes_tests.jl index daecebff..762a7a90 100644 --- a/test/structured_prob_nodes_tests.jl +++ b/test/structured_prob_nodes_tests.jl @@ -126,7 +126,7 @@ using DataFrames: DataFrame vtree = Vtree(n_vars, :random) sdd = compile(SddMgr(vtree), zoo_cnf(cnf_path)) @test num_variables(sdd) == n_vars - psdd = convert(StructProbCircuit, sdd) + psdd = compile(StructProbCircuit, sdd) @test num_variables(psdd) == n_vars @test issmooth(psdd) @test isdecomposable(psdd)