Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Public Member Functions | List of all members
srfm::geodesic::GeodesicSolver Class Reference

#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.
 

Detailed Description

Definition at line 79 of file geodesic_solver.hpp.

Constructor & Destructor Documentation

◆ GeodesicSolver()

srfm::geodesic::GeodesicSolver::GeodesicSolver ( )
defaultnoexcept

Member Function Documentation

◆ solve()

std::optional< GeodesicState > srfm::geodesic::GeodesicSolver::solve ( const GeodesicState &  initial,
const MetricTensor &  metric,
int  steps,
double  dt 
) const
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.

Parameters
initialInitial (x, u) state.
metricBackground metric tensor (treated as constant in space).
stepsNumber of RK4 integration steps.
dtProper-time step size dτ.
Returns
Final GeodesicState after integration, or std::nullopt on error.
Examples
/home/runner/work/Special-Relativity-in-Financial-Modeling/Special-Relativity-in-Financial-Modeling/src/geodesic/geodesic_solver.hpp.

Definition at line 109 of file geodesic_solver.cpp.


The documentation for this class was generated from the following files: