jexplore.steps.stretch ====================== .. py:module:: jexplore.steps.stretch .. autoapi-nested-parse:: This module define the class for a MH step based on stretch proposal. Classes ------- .. autoapisummary:: jexplore.steps.stretch.Stretch Module Contents --------------- .. py:class:: Stretch[Tepoch: jexplore.sampling.EpochMH, Tstate: jexplore.sampling.StateMH, Tsampling: jexplore.sampling.SamplingMH](a = 2.0, ngroups = 2, permute = False) Bases: :py:obj:`jexplore.steps.colored.ColoredSC`\ [\ :py:obj:`Tepoch`\ , :py:obj:`Tstate`\ , :py:obj:`Tsampling`\ ] Class implementing a MH steps based on stretch proposal :param a: stretch proposal `a` parameter :param ngroups: number of groups. Default 2. :param permute: if true walkers are permuted at each iteration. .. py:attribute:: npart :type: int :value: 1 number of partners needed to build the proposal .. py:attribute:: a :type: float stretch proposal `a` parameter .. py:attribute:: sa .. py:method:: sample_z(key, size) Sample the z distribution :param key: PRNG key :param size: output size :return: samples .. py:method:: proposal(key, state, group, cgroup) Propose a new state according to the stretch proposal algorithm. :param key: PRNG key :param state: current state :param group: indexes of the color chains :param cgroup: indexes of the complementary chains for this color. :return: new state and the boolean mask of the chains modified by the step.