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 | Static Public Attributes | List of all members
srfm::tensor::ChristoffelN Class Reference

Computes Christoffel symbols Γ^λ_μν for an NAssetManifold. More...

#include <christoffel_n.hpp>

Public Member Functions

 ChristoffelN (const NAssetManifold &manifold) noexcept
 Construct from a manifold reference.
 
std::optional< double > symbol (int lambda, int mu, int nu, const Eigen::VectorXd &x) const noexcept
 Compute a single Christoffel symbol Γ^lambda_mu_nu at point x.
 
std::optional< std::vector< std::vector< std::vector< double > > > > all_symbols (const Eigen::VectorXd &x) const noexcept
 Compute all Christoffel symbols at point x.
 
bool verify_symmetry (const Eigen::VectorXd &x, double tol=1e-10) const noexcept
 Verify that Γ^λ_μν = Γ^λ_νμ for all indices at point x.
 
int dim () const noexcept
 Return the dimension of the manifold.
 

Static Public Attributes

static constexpr double FD_STEP = 1e-5
 Central finite-difference step size used for metric derivatives.
 

Detailed Description

Computes Christoffel symbols Γ^λ_μν for an NAssetManifold.

Metric derivatives are approximated by central finite differences with step size FD_STEP. For a constant metric all derivatives vanish and every Christoffel symbol is exactly zero.

Definition at line 44 of file christoffel_n.hpp.

Constructor & Destructor Documentation

◆ ChristoffelN()

srfm::tensor::ChristoffelN::ChristoffelN ( const NAssetManifold &  manifold)
explicitnoexcept

Construct from a manifold reference.

The manifold must remain valid for the lifetime of this object.

Parameters
manifoldThe NAssetManifold providing the metric.

Definition at line 28 of file christoffel_n.cpp.

Member Function Documentation

◆ all_symbols()

std::optional< std::vector< std::vector< std::vector< double > > > > srfm::tensor::ChristoffelN::all_symbols ( const Eigen::VectorXd &  x) const
noexcept

Compute all Christoffel symbols at point x.

Returns a dim() × dim() × dim() tensor stored as nested std::vector: result[lambda][mu][nu] = Γ^lambda_mu_nu

Parameters
xCoordinate point of length dim().
Returns
Full tensor, or std::nullopt on failure.

Definition at line 101 of file christoffel_n.cpp.

◆ dim()

int srfm::tensor::ChristoffelN::dim ( ) const
inlinenoexcept

Return the dimension of the manifold.

Returns
manifold_.dim().

Definition at line 151 of file christoffel_n.hpp.

◆ symbol()

std::optional< double > srfm::tensor::ChristoffelN::symbol ( int  lambda,
int  mu,
int  nu,
const Eigen::VectorXd &  x 
) const
noexcept

Compute a single Christoffel symbol Γ^lambda_mu_nu at point x.

Uses the formula: Γ^λ_μν = ½ g^λσ (∂_μ g_νσ + ∂_ν g_μσ - ∂_σ g_μν)

Metric derivatives are approximated by central FD with step FD_STEP.

Parameters
lambdaContravariant index, in [0, dim).
muFirst covariant index, in [0, dim).
nuSecond covariant index, in [0, dim).
xCoordinate point, must have length dim().
Returns
Γ^lambda_mu_nu, or std::nullopt on dimension mismatch or metric inversion failure.

Definition at line 67 of file christoffel_n.cpp.

◆ verify_symmetry()

bool srfm::tensor::ChristoffelN::verify_symmetry ( const Eigen::VectorXd &  x,
double  tol = 1e-10 
) const
noexcept

Verify that Γ^λ_μν = Γ^λ_νμ for all indices at point x.

Checks the symmetry of the lower two indices, which holds for torsion-free connections.

Parameters
xCoordinate point of length dim().
tolTolerance for the symmetry check (default 1e-10).
Returns
true if symmetric within tolerance, false otherwise. Returns false (not nullopt) on dimension mismatch.

Definition at line 159 of file christoffel_n.cpp.

Member Data Documentation

◆ FD_STEP

constexpr double srfm::tensor::ChristoffelN::FD_STEP = 1e-5
staticconstexpr

Central finite-difference step size used for metric derivatives.

Definition at line 47 of file christoffel_n.hpp.


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