|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
#include <tensor.hpp>
Public Member Functions | |
| ChristoffelSymbolsDual (const MetricTensor &metric, DualMetricFunction dual_fn) | |
| ChristoffelArray | compute (const SpacetimePoint &x) const |
| FourVelocity | contract (const ChristoffelArray &gamma, const FourVelocity &u) const |
Christoffel symbols computed via dual-number forward-mode autodiff.
Replaces the O(h²) central finite-difference approximation in ChristoffelSymbols with an exact computation. The metric function is re-evaluated at a dual-number point xd = x + ε·ê_σ; the ε-component of the result is the exact partial derivative ∂g_μν/∂x^σ, with zero truncation error and no step-size sensitivity.
The caller must supply a DualMetricFunction in addition to the standard MetricFunction. This is the same mathematical object as the metric, but templated over DualNumber arithmetic instead of double arithmetic.
Each of the 4 derivative directions requires one call to the dual metric function (vs. 2 calls each for central differences). Total cost: 4 calls vs. 8 calls per Christoffel evaluation, and no step-size h to tune.
Definition at line 475 of file tensor.hpp.
| srfm::tensor::ChristoffelSymbolsDual::ChristoffelSymbolsDual | ( | const MetricTensor & | metric, |
| DualMetricFunction | dual_fn | ||
| ) |
Construct from a base MetricTensor and a dual-number metric function.
| metric | Base metric tensor (used for inverse metric g^λσ). |
| dual_fn | Dual-number analogue of the metric function, used for exact derivative extraction via autodiff. |
Definition at line 28 of file christoffel_dual.cpp.
| ChristoffelArray srfm::tensor::ChristoffelSymbolsDual::compute | ( | const SpacetimePoint & | x | ) | const |
Compute all Γ^λ_μν at point x using dual-number autodiff.
For each coordinate σ ∈ {0,1,2,3}:
Then assemble Γ^λ_μν using the standard formula with g^λσ from the base metric inverse.
| x | Spacetime point at which to evaluate Γ^λ_μν. |
Definition at line 61 of file christoffel_dual.cpp.
| FourVelocity srfm::tensor::ChristoffelSymbolsDual::contract | ( | const ChristoffelArray & | gamma, |
| const FourVelocity & | u | ||
| ) | const |
Contract Christoffel symbols with a four-velocity (identical to ChristoffelSymbols::contract).
Definition at line 106 of file christoffel_dual.cpp.