Skip to main content

MetricInv

Struct MetricInv 

Source
pub struct MetricInv<const N: usize, S: Space<N>> {
    pub value: Tensor<N, 2, Sym, S::SymStore>,
    pub derivs: Tensor<N, 3, SymVec, S::SymVecStore>,
}
Expand description

The inverse of a metric, along with partial derivatives.

Fields§

§value: Tensor<N, 2, Sym, S::SymStore>§derivs: Tensor<N, 3, SymVec, S::SymVecStore>

Implementations§

Source§

impl<const N: usize, S: Space<N>> MetricInv<N, S>

Source

pub fn cotrace<I: TensorIndex<N, 2>, St: TensorStorageRef>( &self, matrix: &Tensor<N, 2, I, St>, ) -> f64

Computes the trace of a fully covariant 2-tensor.

Source

pub fn raise_first<const R: usize, I: TensorIndex<N, R>, St: TensorStorageOwned + Default>( &self, tensor: &Tensor<N, R, I, St>, ) -> Tensor<N, R, I, St>

Raises the first index of a general r-tensor.

Source

pub fn raise_last<const R: usize, I: TensorIndex<N, R>, St: TensorStorageOwned + Default>( &self, tensor: &Tensor<N, R, I, St>, ) -> Tensor<N, R, I, St>

Raises the last index of a general r-tensor.

Auto Trait Implementations§

§

impl<const N: usize, S> Freeze for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: Freeze, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: Freeze,

§

impl<const N: usize, S> RefUnwindSafe for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: RefUnwindSafe, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: RefUnwindSafe,

§

impl<const N: usize, S> Send for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: Send, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: Send,

§

impl<const N: usize, S> Sync for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: Sync, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: Sync,

§

impl<const N: usize, S> Unpin for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: Unpin, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: Unpin,

§

impl<const N: usize, S> UnsafeUnpin for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: UnsafeUnpin, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: UnsafeUnpin,

§

impl<const N: usize, S> UnwindSafe for MetricInv<N, S>
where Tensor<N, 2, Sym, <S as Space<N>>::SymStore>: UnwindSafe, Tensor<N, 3, Compound<3, 2, 1, Sym, Gen>, <S as Space<N>>::SymVecStore>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.