#[repr(C)]pub struct Basis<const N: usize> {
pub matrix: LinearMap<N, N>,
}Fields§
§matrix: LinearMap<N, N>Basis vectors are stored as columns.
Implementations§
Source§impl<const N: usize> Basis<N>
impl<const N: usize> Basis<N>
Sourcepub fn new(matrix: LinearMap<N, N>) -> Result<Self, AnalysisError>
pub fn new(matrix: LinearMap<N, N>) -> Result<Self, AnalysisError>
Basis from a change-of-basis matrix — requires invertibility (nonzero determinant).
Sourcepub fn from_coordinates(
&self,
coordinates: Vector<N>,
) -> Result<Vector<N>, AnalysisError>
pub fn from_coordinates( &self, coordinates: Vector<N>, ) -> Result<Vector<N>, AnalysisError>
Map basis coordinates to ambient-space vectors (B·c).
Sourcepub fn to_coordinates(
&self,
vector: Vector<N>,
) -> Result<Vector<N>, AnalysisError>
pub fn to_coordinates( &self, vector: Vector<N>, ) -> Result<Vector<N>, AnalysisError>
Solve for v’s coordinates in this basis (B⁻¹·v).
Trait Implementations§
impl<const N: usize> Copy for Basis<N>
impl<const N: usize> StructuralPartialEq for Basis<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Basis<N>
impl<const N: usize> RefUnwindSafe for Basis<N>
impl<const N: usize> Send for Basis<N>
impl<const N: usize> Sync for Basis<N>
impl<const N: usize> Unpin for Basis<N>
impl<const N: usize> UnsafeUnpin for Basis<N>
impl<const N: usize> UnwindSafe for Basis<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