Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Luc Libralesso
cryptodag
Commits
56704c5d
Commit
56704c5d
authored
Dec 26, 2020
by
Luc Libralesso
Browse files
update shaving writer
parent
3d9f5516
Changes
1
Hide whitespace changes
Inline
Side-by-side
writers/abstract_constraints_atomic.rb
View file @
56704c5d
...
...
@@ -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
(
atoms
2
,
operators
2
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment