1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! Stratonovich stochastic differential equations on Riemannian manifolds.
//!
//! A single Stratonovich step on the orthonormal frame bundle advances `(p, r)`
//! by `dt` under the horizontal vector fields:
//!
//! ```text
//! d(p, r) = H_i(p, r) ∘ dW^i (Stratonovich)
//! ```
//!
//! where `H_i` is the horizontal lift of the `i`-th frame vector. In the
//! minimal retraction-based discretisation used here, a step is
//!
//! 1. Form horizontal velocity `u = Σ dW_i · e_i ∈ T_p M`.
//! 2. Advance the base point: `p' = retract_p(u · √dt)`.
//! 3. Parallel-transport the frame from `p` to `p'` along the step, then
//! Gram-Schmidt re-orthonormalise to absorb discretisation drift.
//!
//! This is first-order accurate in `dt` for Stratonovich SDEs (the
//! Stratonovich correction is absent because the drift is zero in frame
//! coordinates — the discretisation bias appears only as `O(dt)` in the
//! base-point projection).
use ;
use crateStochasticError;
use crateOrthonormalFrame;
use cratehorizontal_velocity;
/// Marker trait for manifolds on which Stratonovich stochastic development
/// is available via this crate's default retraction-based integrator.
///
/// Automatically implemented for any manifold that already supplies
/// retraction and vector transport. (Vector transport is auto-implemented
/// for manifolds with exact parallel transport via the blanket impl in
/// `cartan-core`, so in practice this trait is available wherever
/// `Manifold + Retraction + ParallelTransport` is.)
///
/// Downstream crates can implement this trait explicitly to override the
/// default with a manifold-specific higher-order scheme (for example, the
/// exact Lie group development on SO(n) via the matrix exponential).
/// One Stratonovich-Euler step on `O(M)`.
///
/// Returns the new base point and the transported-and-reorthonormalised
/// frame. Fails if `dw.len() != frame.len()` or if parallel transport lands
/// on a frame that Gram-Schmidt cannot orthonormalise (rank-deficient,
/// indicating a numerical collapse, typically at a cut locus).
///
/// `tol` is the Gram-Schmidt rank-deficiency threshold (1e-10 is a good
/// default for f64 on well-conditioned manifolds; loosen to 1e-6 near
/// near-singular points).