dwave.optimization.symbols.DisjointLists#
- class DisjointLists#
Disjoint-lists decision-variable symbol.
Examples
This example adds a disjoint-lists symbol to a model.
>>> from dwave.optimization.model import Model >>> model = Model() >>> l = model.disjoint_lists(primary_set_size=10, num_disjoint_lists=2) >>> type(l[0]) <class 'dwave.optimization.symbols.DisjointLists'>
- __init__(*args, **kwargs)#
Methods
__init__
(*args, **kwargs)equals
(other)Compare whether two nodes are identical.
expired
()has_state
([index])Return the initialization status of the indexed state.
iter_predecessors
()Iterate over a node's predecessors in the model.
iter_successors
()Iterate over a node's successors in the model.
maybe_equals
(other)Compare to another node.
num_disjoint_lists
()Return the number of disjoint lists in the symbol.
reset_state
(index)Reset the state of a node and any successor symbols.
set_state
(index, state)Set the state of the disjoint-lists symbol.
shares_memory
(other)Determine if two symbols share memory.
state_size
()Return an estimated size, in bytes, of the node's state.
topological_index
()Topological index of the node.
Attributes
model