[−][src]Struct alga::general::Id
The universal identity element wrt. a given operator, usually noted Id
with a
context-dependent subscript.
By default, it is the multiplicative identity element. It represents the degenerate set containing only the identity element of any group-like structure. It has no dimension known at compile-time. All its operations are no-ops.
Methods
impl<O: Operator> Id<O>
[src]
impl<O: Operator> Id<O>
Trait Implementations
impl<O: Operator> AbstractMagma<O> for Id<O>
[src]
impl<O: Operator> AbstractMagma<O> for Id<O>
fn operate(&self, _: &Self) -> Id<O>
[src]
fn operate(&self, _: &Self) -> Id<O>
fn op(&self, _: O, lhs: &Self) -> Self
[src]
fn op(&self, _: O, lhs: &Self) -> Self
Performs specific operation.
impl<O: Operator> AbstractQuasigroup<O> for Id<O>
[src]
impl<O: Operator> AbstractQuasigroup<O> for Id<O>
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool where
Self: RelativeEq,
[src]
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool where
Self: RelativeEq,
Returns true
if latin squareness holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_inv_is_latin_square(args: (Self, Self)) -> bool where
Self: Eq,
[src]
fn prop_inv_is_latin_square(args: (Self, Self)) -> bool where
Self: Eq,
Returns true
if latin squareness holds for the given arguments.
impl<O: Operator> AbstractSemigroup<O> for Id<O>
[src]
impl<O: Operator> AbstractSemigroup<O> for Id<O>
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: RelativeEq,
[src]
fn prop_is_associative_approx(args: (Self, Self, Self)) -> bool where
Self: RelativeEq,
Returns true
if associativity holds for the given arguments. Approximate equality is used for verifications. Read more
fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
[src]
fn prop_is_associative(args: (Self, Self, Self)) -> bool where
Self: Eq,
Returns true
if associativity holds for the given arguments.
impl<O: Operator> AbstractLoop<O> for Id<O>
[src]
impl<O: Operator> AbstractLoop<O> for Id<O>
impl<O: Operator> AbstractMonoid<O> for Id<O>
[src]
impl<O: Operator> AbstractMonoid<O> for Id<O>
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: RelativeEq,
[src]
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> bool where
Self: RelativeEq,
Checks whether operating with the identity element is a no-op for the given argument. Approximate equality is used for verifications. Read more
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
[src]
fn prop_operating_identity_element_is_noop(args: (Self,)) -> bool where
Self: Eq,
Checks whether operating with the identity element is a no-op for the given argument. Read more
impl<O: Operator> AbstractGroup<O> for Id<O>
[src]
impl<O: Operator> AbstractGroup<O> for Id<O>
impl<O: Operator> AbstractGroupAbelian<O> for Id<O>
[src]
impl<O: Operator> AbstractGroupAbelian<O> for Id<O>
fn prop_is_commutative_approx(args: (Self, Self)) -> bool where
Self: RelativeEq,
[src]
fn prop_is_commutative_approx(args: (Self, Self)) -> bool where
Self: RelativeEq,
Returns true
if the operator is commutative for the given argument tuple. Approximate equality is used for verifications. Read more
fn prop_is_commutative(args: (Self, Self)) -> bool where
Self: Eq,
[src]
fn prop_is_commutative(args: (Self, Self)) -> bool where
Self: Eq,
Returns true
if the operator is commutative for the given argument tuple.
impl<O: Operator> Identity<O> for Id<O>
[src]
impl<O: Operator> Identity<O> for Id<O>
impl<O: Operator> Inverse<O> for Id<O>
[src]
impl<O: Operator> Inverse<O> for Id<O>
fn inverse(&self) -> Self
[src]
fn inverse(&self) -> Self
fn inverse_mut(&mut self)
[src]
fn inverse_mut(&mut self)
impl<O: Operator> MeetSemilattice for Id<O>
[src]
impl<O: Operator> MeetSemilattice for Id<O>
impl<O: Operator> JoinSemilattice for Id<O>
[src]
impl<O: Operator> JoinSemilattice for Id<O>
impl<O: Operator> Lattice for Id<O>
[src]
impl<O: Operator> Lattice for Id<O>
fn meet_join(&self, other: &Self) -> (Self, Self)
[src]
fn meet_join(&self, other: &Self) -> (Self, Self)
Returns the infimum and the supremum simultaneously.
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
[src]
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of self
and other
if they are comparable.
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
[src]
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of self
and other
if they are comparable.
fn partial_sort2<'a>(&'a self, other: &'a Self) -> Option<(&'a Self, &'a Self)>
[src]
fn partial_sort2<'a>(&'a self, other: &'a Self) -> Option<(&'a Self, &'a Self)>
Sorts two values in increasing order using a partial ordering.
fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
[src]
fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
Clamp value
between min
and max
. Returns None
if value
is not comparable to min
or max
. Read more
impl<O: Operator, T: PartialEq + Identity<O>> SubsetOf<T> for Id<O>
[src]
impl<O: Operator, T: PartialEq + Identity<O>> SubsetOf<T> for Id<O>
fn to_superset(&self) -> T
[src]
fn to_superset(&self) -> T
fn is_in_subset(t: &T) -> bool
[src]
fn is_in_subset(t: &T) -> bool
unsafe fn from_superset_unchecked(_: &T) -> Self
[src]
unsafe fn from_superset_unchecked(_: &T) -> Self
fn from_superset(element: &T) -> Option<Self>
[src]
fn from_superset(element: &T) -> Option<Self>
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more
impl<E: EuclideanSpace> Transformation<E> for Id
[src]
impl<E: EuclideanSpace> Transformation<E> for Id
fn transform_point(&self, pt: &E) -> E
[src]
fn transform_point(&self, pt: &E) -> E
fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
[src]
fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
impl<E: EuclideanSpace> ProjectiveTransformation<E> for Id
[src]
impl<E: EuclideanSpace> ProjectiveTransformation<E> for Id
fn inverse_transform_point(&self, pt: &E) -> E
[src]
fn inverse_transform_point(&self, pt: &E) -> E
fn inverse_transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
[src]
fn inverse_transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
impl<E: EuclideanSpace> AffineTransformation<E> for Id
[src]
impl<E: EuclideanSpace> AffineTransformation<E> for Id
type Rotation = Id
Type of the first rotation to be applied.
type NonUniformScaling = Id
Type of the non-uniform scaling to be applied.
type Translation = Id
The type of the pure translation part of this affine transformation.
fn decompose(&self) -> (Id, Id, Id, Id)
[src]
fn decompose(&self) -> (Id, Id, Id, Id)
fn append_translation(&self, _: &Self::Translation) -> Self
[src]
fn append_translation(&self, _: &Self::Translation) -> Self
fn prepend_translation(&self, _: &Self::Translation) -> Self
[src]
fn prepend_translation(&self, _: &Self::Translation) -> Self
fn append_rotation(&self, _: &Self::Rotation) -> Self
[src]
fn append_rotation(&self, _: &Self::Rotation) -> Self
fn prepend_rotation(&self, _: &Self::Rotation) -> Self
[src]
fn prepend_rotation(&self, _: &Self::Rotation) -> Self
fn append_scaling(&self, _: &Self::NonUniformScaling) -> Self
[src]
fn append_scaling(&self, _: &Self::NonUniformScaling) -> Self
fn prepend_scaling(&self, _: &Self::NonUniformScaling) -> Self
[src]
fn prepend_scaling(&self, _: &Self::NonUniformScaling) -> Self
fn append_rotation_wrt_point(&self, r: &Self::Rotation, p: &E) -> Option<Self>
[src]
fn append_rotation_wrt_point(&self, r: &Self::Rotation, p: &E) -> Option<Self>
Appends to this similarity a rotation centered at the point p
, i.e., this point is left invariant. Read more
impl<E: EuclideanSpace> Similarity<E> for Id
[src]
impl<E: EuclideanSpace> Similarity<E> for Id
type Scaling = Id
The type of the pure (uniform) scaling part of this similarity transformation.
fn translation(&self) -> Self::Translation
[src]
fn translation(&self) -> Self::Translation
fn rotation(&self) -> Self::Rotation
[src]
fn rotation(&self) -> Self::Rotation
fn scaling(&self) -> Self::Scaling
[src]
fn scaling(&self) -> Self::Scaling
fn translate_point(&self, pt: &E) -> E
[src]
fn translate_point(&self, pt: &E) -> E
Applies this transformation's pure translational part to a point.
fn rotate_point(&self, pt: &E) -> E
[src]
fn rotate_point(&self, pt: &E) -> E
Applies this transformation's pure rotational part to a point.
fn scale_point(&self, pt: &E) -> E
[src]
fn scale_point(&self, pt: &E) -> E
Applies this transformation's pure scaling part to a point.
fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
[src]
fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation's pure rotational part to a vector.
fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
[src]
fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation's pure scaling part to a vector.
fn inverse_translate_point(&self, pt: &E) -> E
[src]
fn inverse_translate_point(&self, pt: &E) -> E
Applies this transformation inverse's pure translational part to a point.
fn inverse_rotate_point(&self, pt: &E) -> E
[src]
fn inverse_rotate_point(&self, pt: &E) -> E
Applies this transformation inverse's pure rotational part to a point.
fn inverse_scale_point(&self, pt: &E) -> E
[src]
fn inverse_scale_point(&self, pt: &E) -> E
Applies this transformation inverse's pure scaling part to a point.
fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
[src]
fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse's pure rotational part to a vector.
fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
[src]
fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse's pure scaling part to a vector.
impl<E: EuclideanSpace> Isometry<E> for Id
[src]
impl<E: EuclideanSpace> Isometry<E> for Id
impl<E: EuclideanSpace> DirectIsometry<E> for Id
[src]
impl<E: EuclideanSpace> DirectIsometry<E> for Id
impl<E: EuclideanSpace> OrthogonalTransformation<E> for Id
[src]
impl<E: EuclideanSpace> OrthogonalTransformation<E> for Id
impl<E: EuclideanSpace> Scaling<E> for Id
[src]
impl<E: EuclideanSpace> Scaling<E> for Id
fn to_real(&self) -> E::Real
[src]
fn to_real(&self) -> E::Real
Converts this scaling factor to a real. Same as self.to_superset()
.
fn from_real(r: E::Real) -> Option<Self>
[src]
fn from_real(r: E::Real) -> Option<Self>
Attempts to convert a real to an element of this scaling subgroup. Same as Self::from_superset()
. Returns None
if no such scaling is possible for this subgroup. Read more
fn powf(&self, n: E::Real) -> Option<Self>
[src]
fn powf(&self, n: E::Real) -> Option<Self>
Raises the scaling to a power. The result must be equivalent to self.to_superset().powf(n)
. Returns None
if the result is not representable by Self
. Read more
fn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
[src]
fn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
The scaling required to make a
have the same norm as b
, i.e., |b| = |a| * norm_ratio(a, b)
. Read more
impl<E: EuclideanSpace> Translation<E> for Id
[src]
impl<E: EuclideanSpace> Translation<E> for Id
fn to_vector(&self) -> E::Coordinates
[src]
fn to_vector(&self) -> E::Coordinates
fn from_vector(v: E::Coordinates) -> Option<Self>
[src]
fn from_vector(v: E::Coordinates) -> Option<Self>
fn powf(&self, n: E::Real) -> Option<Self>
[src]
fn powf(&self, n: E::Real) -> Option<Self>
Raises the translation to a power. The result must be equivalent to self.to_superset() * n
. Returns None
if the result is not representable by Self
. Read more
fn translation_between(a: &E, b: &E) -> Option<Self>
[src]
fn translation_between(a: &E, b: &E) -> Option<Self>
The translation needed to make a
coincide with b
, i.e., b = a * translation_to(a, b)
.
impl<E: EuclideanSpace> Rotation<E> for Id
[src]
impl<E: EuclideanSpace> Rotation<E> for Id
fn powf(&self, _: E::Real) -> Option<Self>
[src]
fn powf(&self, _: E::Real) -> Option<Self>
fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
[src]
fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
_: E::Real
) -> Option<Self>
[src]
fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
_: E::Real
) -> Option<Self>
impl<O: Operator> PartialOrd<Id<O>> for Id<O>
[src]
impl<O: Operator> PartialOrd<Id<O>> for Id<O>
fn partial_cmp(&self, _: &Id<O>) -> Option<Ordering>
[src]
fn partial_cmp(&self, _: &Id<O>) -> Option<Ordering>
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<O: Operator> PartialEq<Id<O>> for Id<O>
[src]
impl<O: Operator> PartialEq<Id<O>> for Id<O>
fn eq(&self, _: &Id<O>) -> bool
[src]
fn eq(&self, _: &Id<O>) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<O: Operator> Clone for Id<O>
[src]
impl<O: Operator> Clone for Id<O>
fn clone(&self) -> Id<O>
[src]
fn clone(&self) -> Id<O>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<O: Operator> Copy for Id<O>
[src]
impl<O: Operator> Copy for Id<O>
impl<O: Operator> Eq for Id<O>
[src]
impl<O: Operator> Eq for Id<O>
impl<O: Operator> Display for Id<O>
[src]
impl<O: Operator> Display for Id<O>
impl<O: Debug + Operator> Debug for Id<O>
[src]
impl<O: Debug + Operator> Debug for Id<O>
impl Add<Id<Additive>> for Id<Additive>
[src]
impl Add<Id<Additive>> for Id<Additive>
type Output = Id<Additive>
The resulting type after applying the +
operator.
fn add(self, _: Id<Additive>) -> Id<Additive>
[src]
fn add(self, _: Id<Additive>) -> Id<Additive>
impl Mul<Id<Multiplicative>> for Id
[src]
impl Mul<Id<Multiplicative>> for Id
impl Div<Id<Multiplicative>> for Id
[src]
impl Div<Id<Multiplicative>> for Id
impl AddAssign<Id<Additive>> for Id<Additive>
[src]
impl AddAssign<Id<Additive>> for Id<Additive>
fn add_assign(&mut self, _: Id<Additive>)
[src]
fn add_assign(&mut self, _: Id<Additive>)
impl MulAssign<Id<Multiplicative>> for Id
[src]
impl MulAssign<Id<Multiplicative>> for Id
fn mul_assign(&mut self, _: Id)
[src]
fn mul_assign(&mut self, _: Id)
impl DivAssign<Id<Multiplicative>> for Id
[src]
impl DivAssign<Id<Multiplicative>> for Id
fn div_assign(&mut self, _: Id)
[src]
fn div_assign(&mut self, _: Id)
impl<O: Operator> AbsDiffEq for Id<O>
[src]
impl<O: Operator> AbsDiffEq for Id<O>
type Epsilon = Id<O>
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn default_epsilon() -> Self::Epsilon
fn abs_diff_eq(&self, _: &Self, _: Self::Epsilon) -> bool
[src]
fn abs_diff_eq(&self, _: &Self, _: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
The inverse of ApproxEq::abs_diff_eq
.
impl<O: Operator> RelativeEq for Id<O>
[src]
impl<O: Operator> RelativeEq for Id<O>
fn default_max_relative() -> Self::Epsilon
[src]
fn default_max_relative() -> Self::Epsilon
fn relative_eq(&self, _: &Self, _: Self::Epsilon, _: Self::Epsilon) -> bool
[src]
fn relative_eq(&self, _: &Self, _: Self::Epsilon, _: Self::Epsilon) -> bool
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
impl<O: Operator> UlpsEq for Id<O>
[src]
impl<O: Operator> UlpsEq for Id<O>
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
fn ulps_eq(&self, _: &Self, _: Self::Epsilon, _: u32) -> bool
[src]
fn ulps_eq(&self, _: &Self, _: Self::Epsilon, _: u32) -> bool
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
impl Zero for Id<Additive>
[src]
impl Zero for Id<Additive>
impl One for Id
[src]
impl One for Id
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T