dimod.SampleSet.done#
- SampleSet.done()[source]#
Return True if a pending computation is done.
Used when a
SampleSetis constructed withSampleSet.from_future().Examples
This example uses a
Futureobject directly. Typically aExecutorsets the result of the future (see documentation forconcurrent.futures).>>> from concurrent.futures import Future ... >>> future = Future() >>> sampleset = dimod.SampleSet.from_future(future) >>> future.done() False >>> future.set_result(dimod.ExactSolver().sample_ising({0: -1}, {})) >>> future.done() True >>> sampleset.first.energy -1.0