Commit bb44ce0d authored by Rémi's avatar Rémi
Browse files

Update jIIR2AG for AdderGraphs 0.2

parent f59cb078
name = "jIIR2AG"
uuid = "6c47329b-b4fa-45de-8436-c3dbac5ca469"
version = "0.1.0"
version = "0.1.1"
[deps]
AdderGraphs = "818587fb-0c22-4279-a2b9-8b16b5360b71"
......@@ -8,4 +8,4 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
[compat]
AdderGraphs = "~0.1"
AdderGraphs = "~0.2"
......@@ -107,10 +107,9 @@ function iir_ilp1!(model::Model,
end
subtraction = [value(model[:cai_right_shsg][i]) < 0, value(model[:cai_left_sg][i]) < 0]
push_node!(solution.addergraph_a,
AdderNode(round(Int, value(model[:ca][i])), # value
[abs(round(Int, value(model[:cai_right_shsg][i]))) << -input_shift, abs(round(Int, value(model[:cai_left_sg][i])))],
[input_shift+node_shift, node_shift],
subtraction
AdderNode(round(Int, value(model[:ca][i])),
[InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
))
end
end
......@@ -133,10 +132,9 @@ function iir_ilp1!(model::Model,
end
subtraction = [value(model[:cai_right_shsg][i]) < 0, value(model[:cai_left_sg][i]) < 0]
push_node!(solution.addergraph_b,
AdderNode(round(Int, value(model[:ca][i])), # value
[abs(round(Int, value(model[:cai_right_shsg][i]))) << -input_shift, abs(round(Int, value(model[:cai_left_sg][i])))],
[input_shift+node_shift, node_shift],
subtraction
AdderNode(round(Int, value(model[:ca][i])),
[InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,1]))), input_shift+node_shift, subtraction[1]),
InputEdge(get_addernode_by_value(addergraph, round(Int, value(model[:cai][i,2]))), node_shift, subtraction[2])]
))
end
end
......
Supports Markdown
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