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::manifold::NAssetInterval Class Reference

Computes spacetime intervals between N-asset events. More...

#include <n_asset_interval.hpp>

Public Member Functions

 NAssetInterval () noexcept=default
 Default constructor.
 
std::optional< IntervalResult > compute (const NAssetEvent &a, const NAssetEvent &b, const NAssetManifold &manifold) const noexcept
 Compute ds² = g_μν Δx^μ Δx^ν between two events.
 
std::optional< std::vector< IntervalResult > > batch_from_reference (const NAssetEvent &ref, std::span< const NAssetEvent > events, const NAssetManifold &manifold) const noexcept
 Compute intervals from a reference event to many events.
 

Detailed Description

Computes spacetime intervals between N-asset events.

Stateless: all methods are const and noexcept.

Definition at line 105 of file n_asset_interval.hpp.

Constructor & Destructor Documentation

◆ NAssetInterval()

srfm::manifold::NAssetInterval::NAssetInterval ( )
defaultnoexcept

Default constructor.

Member Function Documentation

◆ batch_from_reference()

std::optional< std::vector< IntervalResult > > srfm::manifold::NAssetInterval::batch_from_reference ( const NAssetEvent &  ref,
std::span< const NAssetEvent >  events,
const NAssetManifold &  manifold 
) const
noexcept

Compute intervals from a reference event to many events.

Equivalent to calling compute(ref, events[i], manifold) for each i.

Parameters
refReference event.
eventsSpan of target events.
manifoldThe NAssetManifold.
Returns
Vector of IntervalResults (same length as events), or std::nullopt if any individual computation fails.

Definition at line 73 of file n_asset_interval.cpp.

◆ compute()

std::optional< IntervalResult > srfm::manifold::NAssetInterval::compute ( const NAssetEvent &  a,
const NAssetEvent &  b,
const NAssetManifold &  manifold 
) const
noexcept

Compute ds² = g_μν Δx^μ Δx^ν between two events.

Δx = b.to_coords() - a.to_coords().

Parameters
aFirst event.
bSecond event.
manifoldThe NAssetManifold providing the metric.
Returns
IntervalResult, or std::nullopt on dimension mismatch.

Definition at line 40 of file n_asset_interval.cpp.


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