mappy_ds.DiscreteMode#

class mappy_ds.DiscreteMode(name, fun, in_trajectory=False)#

A mode whose evolution is a single application of a map.

Parameters:
namestr

Unique name of the mode.

funSystemFunction

The map, declared with mappy_ds.mapping().

in_trajectorybool, optional

Whether the jump contributes a (two-point) trajectory segment, by default False.

Examples

>>> import numpy as np
>>> from mappy_ds import DiscreteMode, mapping
>>> @mapping(2)
... def fire(y, p):
...     return y + np.array([p["c"] - 30, p["d"]])
>>> jump = DiscreteMode("jump", fire)
>>> jump.step([30.0, -1.0], {"c": -50.0, "d": 2.0}, jacobian=True).jac
array([[1., 0.],
       [0., 1.]])

Properties

cod_dim

Dimension of the state space the mode ends in.

dom_dim

Dimension of the state space the mode starts in.

Methods

step(y0[, params, jacobian, hessian, ...])

Evolve y0 through the mode; see Mode.step().