Skip to content

Commit

Permalink
Rename convert to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
RenatoGeh authored and khosravipasha committed Mar 12, 2021
1 parent 2796348 commit b860c33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/structured_prob_nodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/structured_prob_nodes_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b860c33

Please sign in to comment.