|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
#include <geodesic_solver.hpp>
Public Member Functions | |
| GeodesicSolver () noexcept=default | |
| std::optional< GeodesicState > | solve (const GeodesicState &initial, const MetricTensor &metric, int steps, double dt) const noexcept |
Integrate the geodesic equation for steps RK4 steps. | |
Definition at line 79 of file geodesic_solver.hpp.
|
defaultnoexcept |
|
noexcept |
Integrate the geodesic equation for steps RK4 steps.
At each step, Christoffel symbols are computed from metric at the current position. For a constant (flat) metric this is equivalent to evaluating at the origin: Γ = 0, giving straight-line trajectories.
Safety guarantees: • Returns std::nullopt if initial state is non-finite. • Returns std::nullopt if any intermediate state becomes non-finite. • Never loops more than steps times. • steps is clamped to [1, 100'000] to prevent runaway. • dt (dτ) is clamped to [1e-8, 1.0] to prevent instability.
| initial | Initial (x, u) state. |
| metric | Background metric tensor (treated as constant in space). |
| steps | Number of RK4 integration steps. |
| dt | Proper-time step size dτ. |
Definition at line 109 of file geodesic_solver.cpp.