pub struct AffineSubspace {
offset: FpVector,
linear_part: Subspace,
}Fields§
§offset: FpVector§linear_part: SubspaceImplementations§
Source§impl AffineSubspace
impl AffineSubspace
pub fn new(offset: FpVector, linear_part: Subspace) -> Self
pub fn offset(&self) -> &FpVector
pub fn linear_part(&self) -> &Subspace
pub fn sum(&self, other: &Self) -> Self
pub fn contains(&self, vector: FpSlice<'_>) -> bool
pub fn contains_space(&self, other: &Self) -> bool
Trait Implementations§
Source§impl Clone for AffineSubspace
impl Clone for AffineSubspace
Source§fn clone(&self) -> AffineSubspace
fn clone(&self) -> AffineSubspace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AffineSubspace
impl Debug for AffineSubspace
Source§impl Display for AffineSubspace
impl Display for AffineSubspace
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
§Example
let linear_part = Subspace::from_matrix(Matrix::from_vec(TWO, &[vec![0, 1, 0], vec![0, 0, 1]]));
let offset = FpVector::from_slice(TWO, &[1, 0, 0]);
let subspace = AffineSubspace::new(offset, linear_part);
assert_eq!(
format!("{}", subspace),
"[1, 0, 0] + {[0, 1, 0], [0, 0, 1]}"
);Source§impl From<Subspace> for AffineSubspace
impl From<Subspace> for AffineSubspace
Source§impl PartialEq for AffineSubspace
impl PartialEq for AffineSubspace
impl Eq for AffineSubspace
impl StructuralPartialEq for AffineSubspace
Auto Trait Implementations§
impl Freeze for AffineSubspace
impl RefUnwindSafe for AffineSubspace
impl Send for AffineSubspace
impl Sync for AffineSubspace
impl Unpin for AffineSubspace
impl UnwindSafe for AffineSubspace
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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