Skip to content

Make State a class and add Graph::mutated()#589

Draft
wbernoudy wants to merge 1 commit into
dwavesystems:mainfrom
wbernoudy:feature/graph-mutated-nodes
Draft

Make State a class and add Graph::mutated()#589
wbernoudy wants to merge 1 commit into
dwavesystems:mainfrom
wbernoudy:feature/graph-mutated-nodes

Conversation

@wbernoudy

Copy link
Copy Markdown
Member

What does this implement/fix?

This PR adds the Graph::mutated() method which returns the list of decision nodes with "pending" changes (see docstring for more details). It also makes State a class rather than an alias to a vector of data pointers in order to help implement Graph::mutated().

Additional information

For now, I left the implementation of Graph::mutated() simple, and it will return only decision nodes, and not specific successors of DisjointListsNode and DisjointBitSetsNode. However, if we plan to use this directly with descendants()/propagate() etc., we may need to consider returning specific successors because of the known performance hit on models with large amounts of lists/sets on individual DisjointListsNode/DisjointBitSetsNodes.

AI Generation Disclosure

No AI tools used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant