You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to initialize a few nodes of the output graph? I'm trying to propagate known colors for some of the nodes, but my output graph appears to ignore them. If need be I'll post some example code.
Ah, that's one of the modifications I designed but never programmed.
GOs node colors are AFAIK never even read in the first place, in reset():
# set possible colors per nodefornodeinself.GO.nodes():
self._values_per_node[node] =self._all_colors.copy()
Changing that should not take long.
What annoys me is, that there currently is no interface to change while it runs / change the allowed isomorphisms.
But your case should be 95% of what everyone wants anyway, so for the time being that should be enough.
According to my notes from 2 years back I also needed to change the constraint propagation -> done.
@asher-pembroke, I created a new branch, (did not test it enough to release), if you could check it out, that would be great (python setup.py install, you may need to remove the version from pip first)
Note to self: changing c='b' to c='y' tends to break (expected exception) while c='r' looks cool -> could use as example in readme if everything works out
Hey,
the update works for my graph! This is great.
What annoys me is, that there currently is no interface to change while it runs / change the allowed isomorphisms.
But your case should be 95% of what everyone wants anyway, so for the time being that should be enough.
Not sure if this is what you mean, but I'm trying to restrict a node's initial coloring to a subset of the available ones. I tried to specify a list for that node's color attribute, but that raises TypeError: unhashable type: 'list'
What I meant was, you call run(1) to do a one step iteration, afterwards you would limit the colors, then call run() again, so that you can interact with the algorithm. AFAIK there exists a WFC implementation or two that can do that, but I would need to come up with a good interface.
Currently I create a set with the one element given as the color attribute -> setting multiple would not work.
I think it should work if I check if the attribute is one element of all colors or if it is a subset (there is technically an edge case, though...)
Let's see...
Updated the code;
You should now be able to mix colors as node attributes and node attributes that can be converted to sets of colors (it has to be a subset of the colors in GI)
Activity
lamelizard commentedon Dec 7, 2020
Ah, that's one of the modifications I designed but never programmed.
GOs node colors are AFAIK never even read in the first place, in
reset():Changing that should not take long.
What annoys me is, that there currently is no interface to change while it runs / change the allowed isomorphisms.
But your case should be 95% of what everyone wants anyway, so for the time being that should be enough.
lamelizard commentedon Dec 7, 2020
According to my notes from 2 years back I also needed to change the constraint propagation -> done.
@asher-pembroke, I created a new branch, (did not test it enough to release), if you could check it out, that would be great (
python setup.py install, you may need to remove the version from pip first)I tried the following code
lamelizard commentedon Dec 7, 2020
Note to self: changing
c='b'toc='y'tends to break (expected exception) whilec='r'looks cool -> could use as example in readme if everything works outasher-pembroke commentedon Dec 9, 2020
Hey,
the update works for my graph! This is great.
Not sure if this is what you mean, but I'm trying to restrict a node's initial coloring to a subset of the available ones. I tried to specify a list for that node's color attribute, but that raises
TypeError: unhashable type: 'list'lamelizard commentedon Dec 9, 2020
What I meant was, you call
run(1)to do a one step iteration, afterwards you would limit the colors, then callrun()again, so that you can interact with the algorithm. AFAIK there exists a WFC implementation or two that can do that, but I would need to come up with a good interface.Currently I create a set with the one element given as the color attribute -> setting multiple would not work.
I think it should work if I check if the attribute is one element of all colors or if it is a subset (there is technically an edge case, though...)
Let's see...
lamelizard commentedon Dec 9, 2020
Updated the code;
You should now be able to mix colors as node attributes and node attributes that can be converted to sets of colors (it has to be a subset of the colors in GI)
as we override the attributes in GO, you should get the values back with
S.reset()