uvex_transients.phase_space.sampling.base.StoppingRule.run#

StoppingRule.run(sampler: Sampler, x: ArrayLike, seed: SeedSequence) → Outcome[source]#

Sample a point until the rule says to stop.

Each chunk draws from its own child of seed, so a chunk does not depend on the others, and seed is advanced by one child per chunk. Give every point a seed of its own.

Parameters:
  • sampler (Sampler) – What makes the tries.

  • x (array-like) – The point, in the coordinates of the sampler’s space.

  • seed (numpy.random.SeedSequence) – The root seed of the point, whose children seed the chunks.

Returns:

The successes and tries, with the number of chunks as extras["n_chunks"].

Return type:

Outcome