#[repr(C)]pub struct Id<O: Operator = Multiplicative> { /* private fields */ }
Expand description
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.
Implementations§
Trait Implementations§
source§impl<O: Operator> AbsDiffEq for Id<O>
impl<O: Operator> AbsDiffEq for Id<O>
source§impl<O: Operator> AbstractGroupAbelian<O> for Id<O>
impl<O: Operator> AbstractGroupAbelian<O> for Id<O>
source§fn prop_is_commutative_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq,
fn prop_is_commutative_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq,
Returns
true
if the operator is commutative for the given argument tuple. Approximate
equality is used for verifications.source§fn prop_is_commutative(args: (Self, Self)) -> boolwhere
Self: Eq,
fn prop_is_commutative(args: (Self, Self)) -> boolwhere
Self: Eq,
Returns
true
if the operator is commutative for the given argument tuple.source§impl<O: Operator> AbstractMagma<O> for Id<O>
impl<O: Operator> AbstractMagma<O> for Id<O>
source§impl<O: Operator> AbstractMonoid<O> for Id<O>
impl<O: Operator> AbstractMonoid<O> for Id<O>
source§fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq,
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq,
Checks whether operating with the identity element is a no-op for the given
argument. Approximate equality is used for verifications.
source§impl<O: Operator> AbstractQuasigroup<O> for Id<O>
impl<O: Operator> AbstractQuasigroup<O> for Id<O>
source§fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq,
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq,
Returns
true
if latin squareness holds for the given arguments. Approximate
equality is used for verifications. Read moresource§fn prop_inv_is_latin_square(args: (Self, Self)) -> boolwhere
Self: Eq,
fn prop_inv_is_latin_square(args: (Self, Self)) -> boolwhere
Self: Eq,
Returns
true
if latin squareness holds for the given arguments. Read moresource§impl<O: Operator> AbstractSemigroup<O> for Id<O>
impl<O: Operator> AbstractSemigroup<O> for Id<O>
source§fn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq,
fn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq,
Returns
true
if associativity holds for the given arguments. Approximate equality is used
for verifications.source§fn prop_is_associative(args: (Self, Self, Self)) -> boolwhere
Self: Eq,
fn prop_is_associative(args: (Self, Self, Self)) -> boolwhere
Self: Eq,
Returns
true
if associativity holds for the given arguments.source§impl<E: EuclideanSpace> AffineTransformation<E> for Id
impl<E: EuclideanSpace> AffineTransformation<E> for Id
§type NonUniformScaling = Id
type NonUniformScaling = Id
Type of the non-uniform scaling to be applied.
§type Translation = Id
type Translation = Id
The type of the pure translation part of this affine transformation.
source§fn decompose(&self) -> (Id, Id, Id, Id)
fn decompose(&self) -> (Id, Id, Id, Id)
Decomposes this affine transformation into a rotation followed by a non-uniform scaling,
followed by a rotation, followed by a translation.
source§fn append_translation(&self, _: &Self::Translation) -> Self
fn append_translation(&self, _: &Self::Translation) -> Self
Appends a translation to this similarity.
source§fn prepend_translation(&self, _: &Self::Translation) -> Self
fn prepend_translation(&self, _: &Self::Translation) -> Self
Prepends a translation to this similarity.
source§fn append_rotation(&self, _: &Self::Rotation) -> Self
fn append_rotation(&self, _: &Self::Rotation) -> Self
Appends a rotation to this similarity.
source§fn prepend_rotation(&self, _: &Self::Rotation) -> Self
fn prepend_rotation(&self, _: &Self::Rotation) -> Self
Prepends a rotation to this similarity.
source§fn append_scaling(&self, _: &Self::NonUniformScaling) -> Self
fn append_scaling(&self, _: &Self::NonUniformScaling) -> Self
Appends a scaling factor to this similarity.
source§fn prepend_scaling(&self, _: &Self::NonUniformScaling) -> Self
fn prepend_scaling(&self, _: &Self::NonUniformScaling) -> Self
Prepends a scaling factor to this similarity.
source§impl DivAssign for Id
impl DivAssign for Id
source§fn div_assign(&mut self, _: Id)
fn div_assign(&mut self, _: Id)
Performs the
/=
operation. Read moresource§impl<O: Operator> JoinSemilattice for Id<O>
impl<O: Operator> JoinSemilattice for Id<O>
source§impl<O: Operator> Lattice for Id<O>
impl<O: Operator> Lattice for Id<O>
source§fn meet_join(&self, other: &Self) -> (Self, Self)
fn meet_join(&self, other: &Self) -> (Self, Self)
Returns the infimum and the supremum simultaneously.
source§fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of
self
and other
if they are comparable.source§fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of
self
and other
if they are comparable.source§impl<O: Operator> MeetSemilattice for Id<O>
impl<O: Operator> MeetSemilattice for Id<O>
source§impl MulAssign for Id
impl MulAssign for Id
source§fn mul_assign(&mut self, _: Id)
fn mul_assign(&mut self, _: Id)
Performs the
*=
operation. Read moresource§impl<O: Operator> PartialOrd for Id<O>
impl<O: Operator> PartialOrd for Id<O>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl<E: EuclideanSpace> ProjectiveTransformation<E> for Id
impl<E: EuclideanSpace> ProjectiveTransformation<E> for Id
source§fn inverse_transform_point(&self, pt: &E) -> E
fn inverse_transform_point(&self, pt: &E) -> E
Applies this group’s two_sided_inverse action on a point from the euclidean space.
source§fn inverse_transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
fn inverse_transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
Applies this group’s two_sided_inverse action on a vector from the euclidean space. Read more
source§impl<O: Operator> RelativeEq for Id<O>
impl<O: Operator> RelativeEq for Id<O>
source§impl<E: EuclideanSpace> Rotation<E> for Id
impl<E: EuclideanSpace> Rotation<E> for Id
source§fn powf(&self, _: E::RealField) -> Option<Self>
fn powf(&self, _: E::RealField) -> Option<Self>
Raises this rotation to a power. If this is a simple rotation, the result must be
equivalent to multiplying the rotation angle by
n
.source§fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
fn rotation_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
Computes a simple rotation that makes the angle between
a
and b
equal to zero, i.e.,
b.angle(a * delta_rotation(a, b)) = 0
. If a
and b
are collinear, the computed
rotation may not be unique. Returns None
if no such simple rotation exists in the
subgroup represented by Self
.source§fn scaled_rotation_between(
a: &E::Coordinates,
b: &E::Coordinates,
_: E::RealField
) -> Option<Self>
fn scaled_rotation_between( a: &E::Coordinates, b: &E::Coordinates, _: E::RealField ) -> Option<Self>
source§impl<E: EuclideanSpace> Scaling<E> for Id
impl<E: EuclideanSpace> Scaling<E> for Id
source§fn to_real(&self) -> E::RealField
fn to_real(&self) -> E::RealField
Converts this scaling factor to a real. Same as
self.to_superset()
.source§fn from_real(r: E::RealField) -> Option<Self>
fn from_real(r: E::RealField) -> 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.source§fn powf(&self, n: E::RealField) -> Option<Self>
fn powf(&self, n: E::RealField) -> 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
.source§fn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
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)
.source§impl<E: EuclideanSpace> Similarity<E> for Id
impl<E: EuclideanSpace> Similarity<E> for Id
source§fn translation(&self) -> Self::Translation
fn translation(&self) -> Self::Translation
The pure translational component of this similarity transformation.
source§fn rotation(&self) -> Self::Rotation
fn rotation(&self) -> Self::Rotation
The pure rotational component of this similarity transformation.
source§fn scaling(&self) -> Self::Scaling
fn scaling(&self) -> Self::Scaling
The pure scaling component of this similarity transformation.
source§fn translate_point(&self, pt: &E) -> E
fn translate_point(&self, pt: &E) -> E
Applies this transformation’s pure translational part to a point.
source§fn rotate_point(&self, pt: &E) -> E
fn rotate_point(&self, pt: &E) -> E
Applies this transformation’s pure rotational part to a point.
source§fn scale_point(&self, pt: &E) -> E
fn scale_point(&self, pt: &E) -> E
Applies this transformation’s pure scaling part to a point.
source§fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation’s pure rotational part to a vector.
source§fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation’s pure scaling part to a vector.
source§fn inverse_translate_point(&self, pt: &E) -> E
fn inverse_translate_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure translational part to a point.
source§fn inverse_rotate_point(&self, pt: &E) -> E
fn inverse_rotate_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure rotational part to a point.
source§fn inverse_scale_point(&self, pt: &E) -> E
fn inverse_scale_point(&self, pt: &E) -> E
Applies this transformation inverse’s pure scaling part to a point.
source§fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn inverse_rotate_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse’s pure rotational part to a vector.
source§fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
fn inverse_scale_vector(&self, pt: &E::Coordinates) -> E::Coordinates
Applies this transformation inverse’s pure scaling part to a vector.
source§impl<O: Operator, T: PartialEq + Identity<O>> SubsetOf<T> for Id<O>
impl<O: Operator, T: PartialEq + Identity<O>> SubsetOf<T> for Id<O>
source§fn to_superset(&self) -> T
fn to_superset(&self) -> T
The inclusion map: converts
self
to the equivalent element of its superset.source§fn is_in_subset(t: &T) -> bool
fn is_in_subset(t: &T) -> bool
Checks if
element
is actually part of the subset Self
(and can be converted to it).source§unsafe fn from_superset_unchecked(_: &T) -> Self
unsafe fn from_superset_unchecked(_: &T) -> Self
Use with care! Same as
self.to_superset
but without any property checks. Always succeeds.source§impl<E: EuclideanSpace> Transformation<E> for Id
impl<E: EuclideanSpace> Transformation<E> for Id
source§fn transform_point(&self, pt: &E) -> E
fn transform_point(&self, pt: &E) -> E
Applies this group’s action on a point from the euclidean space.
source§fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
fn transform_vector(&self, v: &E::Coordinates) -> E::Coordinates
Applies this group’s action on a vector from the euclidean space. Read more
source§impl<E: EuclideanSpace> Translation<E> for Id
impl<E: EuclideanSpace> Translation<E> for Id
source§fn to_vector(&self) -> E::Coordinates
fn to_vector(&self) -> E::Coordinates
Converts this translation to a vector.
source§fn from_vector(v: E::Coordinates) -> Option<Self>
fn from_vector(v: E::Coordinates) -> Option<Self>
Attempts to convert a vector to this translation. Returns
None
if the translation
represented by v
is not part of the translation subgroup represented by Self
.source§impl<O: Operator> TwoSidedInverse<O> for Id<O>
impl<O: Operator> TwoSidedInverse<O> for Id<O>
source§fn two_sided_inverse(&self) -> Self
fn two_sided_inverse(&self) -> Self
source§fn two_sided_inverse_mut(&mut self)
fn two_sided_inverse_mut(&mut self)
source§impl<O: Operator> UlpsEq for Id<O>
impl<O: Operator> UlpsEq for Id<O>
impl<O: Operator> AbstractGroup<O> for Id<O>
impl<O: Operator> AbstractLoop<O> for Id<O>
impl<O: Operator> Copy for Id<O>
impl<E: EuclideanSpace> DirectIsometry<E> for Id
impl<O: Operator> Eq for Id<O>
impl<E: EuclideanSpace> Isometry<E> for Id
impl<E: EuclideanSpace> OrthogonalTransformation<E> for Id
Auto Trait Implementations§
impl<O> Freeze for Id<O>
impl<O> RefUnwindSafe for Id<O>where
O: RefUnwindSafe,
impl<O> Send for Id<O>where
O: Send,
impl<O> Sync for Id<O>where
O: Sync,
impl<O> Unpin for Id<O>where
O: Unpin,
impl<O> UnwindSafe for Id<O>where
O: UnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.