Commit 56704c5d authored by Luc Libralesso's avatar Luc Libralesso
Browse files

update shaving writer

parent 3d9f5516
......@@ -11,7 +11,7 @@ def get_abstract_constraint_model(dag)
atoms2,operators2 = *shave_dag(atoms, operators)
writefile_graphviz(atoms2, operators2, "test.dot")
# create model
model = create_abstract_model(atoms, operators)
model = create_abstract_model(atoms2, operators2)
return model
end
......@@ -71,7 +71,9 @@ def shave_dag(atoms, operators)
new_atoms.push(new_input)
new_op.inputs = [new_input]
else
new_op.inputs = op.inputs.map{|ivar| atom_map[ivar]}
new_op.inputs = op.inputs
.filter{|ivar| !to_shave.include?(ivar)}
.map{|ivar| atom_map[ivar]}
end
new_operators.push(new_op)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment