conatus.expert.EdgeTracker¶
- class conatus.expert.EdgeTracker(advance, classify, measure, norm, ref, *, t_check, t_max, bisection_tol, separation, t_min, project=None, log=None)[source]¶
Bases:
objectadvance(X, T) -> Xintegrates T time units (T a multiple of the time step, declared by the caller);classify;measure(X) -> dict(recorded along the edge);norm(X)the distance used for the separation test;ref: laminar state.- Parameters:
advance (Callable)
classify (Callable)
measure (Callable)
norm (Callable)
t_check (float)
t_max (float)
bisection_tol (float)
separation (float)
t_min (float)
project (Callable | None)
- fate(X)[source]¶
(+1 turbulent / −1 laminar, decision time); raises UndecidedTrajectory.
The state is classified at every check t = j t_check (j >= 0, from t_min on) up to and including t_max; the times are j * t_check, not a running sum (no drift past t_max).
- Return type:
tuple[int, float]
- bisect(lo, hi)[source]¶
Bracket (A, B) of the edge on the segment [lo, hi] (A laminar side, B turbulent side).
- Return type:
tuple
- run(lo, hi, *, rounds, on_round=None, verify_bracket=True)[source]¶
roundsbisection + follow cycles from the bracket (lo, hi).verify_bracket: the fates oflo(must relaminarize) andhi(must become turbulent) are computed first and a wrong bracket is refused (a bisection on a segment whose two ends share a fate converges to an end point, not to the edge). The fates are kept inbracket_check.- Parameters:
rounds (int)
on_round (Callable | None)
verify_bracket (bool)
- Return type:
list[dict]