Baker¶
Systems · Discrete · Geometric maps
Dimension: 2
Equations¶
@staticjit
def _step(X, alpha):
"""
Right-hand side of the Baker map.
x, y: Current state variables
alpha: Fraction determining the fold (0 < alpha < 1)
Written branchlessly with ``np.where`` (rather than a Python ``if`` on
the state) so the step traces to a straight-line tape and runs on the
Rust engine. On the attractor ``y in [0, 1)`` the single test
``y < alpha`` is equivalent to ``0 <= y < alpha``.
"""
x, y = X
lower = y < alpha
xp = np.where(lower, (2 * x) % 1, (2 * x - 1) % 1) # stretch / shift in x
yp = np.where(lower, y / alpha, (y - alpha) / (1 - alpha)) # fold in y
return xp, yp
Parameters¶
| parameter | default |
|---|---|
alpha |
0.5 |
