#[repr(C)]pub struct RiemannMetric<const N: usize> {
pub coefficients: LinearMap<N, N>,
}Fields§
§coefficients: LinearMap<N, N>Implementations§
Source§impl<const N: usize> RiemannMetric<N>
impl<const N: usize> RiemannMetric<N>
Sourcepub fn new(coefficients: LinearMap<N, N>) -> Result<Self, AnalysisError>
pub fn new(coefficients: LinearMap<N, N>) -> Result<Self, AnalysisError>
Creates a metric from a symmetric coefficient map; AnalysisError when invalid.
Sourcepub fn lower(&self, tangent: Vector<N>) -> Result<Vector<N>, AnalysisError>
pub fn lower(&self, tangent: Vector<N>) -> Result<Vector<N>, AnalysisError>
Lowers a tangent vector to a covector via g.
Sourcepub fn raise(&self, covector: Vector<N>) -> Result<Vector<N>, AnalysisError>
pub fn raise(&self, covector: Vector<N>) -> Result<Vector<N>, AnalysisError>
Raises a covector to a tangent via g⁻¹.
Sourcepub fn inner(
&self,
left: Vector<N>,
right: Vector<N>,
) -> Result<f64, AnalysisError>
pub fn inner( &self, left: Vector<N>, right: Vector<N>, ) -> Result<f64, AnalysisError>
Metric inner product g(left, right).
Sourcepub fn volume_density(&self) -> Result<f64, AnalysisError>
pub fn volume_density(&self) -> Result<f64, AnalysisError>
Volume density √|det g|; error when det g ≤ 0.
Trait Implementations§
Source§impl<const N: usize> Clone for RiemannMetric<N>
impl<const N: usize> Clone for RiemannMetric<N>
impl<const N: usize> Copy for RiemannMetric<N>
Source§impl<const N: usize> Debug for RiemannMetric<N>
impl<const N: usize> Debug for RiemannMetric<N>
Source§impl<const N: usize> PartialEq for RiemannMetric<N>
impl<const N: usize> PartialEq for RiemannMetric<N>
impl<const N: usize> StructuralPartialEq for RiemannMetric<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for RiemannMetric<N>
impl<const N: usize> RefUnwindSafe for RiemannMetric<N>
impl<const N: usize> Send for RiemannMetric<N>
impl<const N: usize> Sync for RiemannMetric<N>
impl<const N: usize> Unpin for RiemannMetric<N>
impl<const N: usize> UnsafeUnpin for RiemannMetric<N>
impl<const N: usize> UnwindSafe for RiemannMetric<N>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more