josiann.moves.discrete.DiscreteMove

class josiann.moves.discrete.DiscreteMove(*, position_set, bounds=None, repr_attributes=(), **kwargs)[source]

Base class for building moves that work on a discrete set of valid positions.

Instantiate a Move.

Parameters:

Methods

DiscreteMove.__init__

Instantiate a Move.

DiscreteMove.get_proposal

Generate a new proposed vector x.

DiscreteMove.set_bounds

Set bounds for the move.

Methods

DiscreteMove.__init__(*, position_set, bounds=None, repr_attributes=(), **kwargs)[source]

Instantiate a Move.

Parameters:
DiscreteMove.get_proposal(x, state)

Generate a new proposed vector x.

Parameters:
Return type:

ndarray[tuple[int, ...], dtype[TypeVar(DT_ARR, bound= float64 | int64)]]

Returns:

New proposed vector x of shape (ndim,).

DiscreteMove.set_bounds(bounds)

Set bounds for the move.

Parameters:

bounds (tuple[float, float] | Sequence[tuple[float, float]] | None) – sequence of (min, max) bounds for values to propose in each dimension.

Return type:

None