pub struct Id<O = Multiplicative>where
O: Operator,{ /* 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> AbsDiffEq<Id<O>> for Id<O>where
O: Operator,
impl<O> AbsDiffEq<Id<O>> for Id<O>where
O: Operator,
source§fn default_epsilon() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
fn default_epsilon() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
The default tolerance to use when testing values that are close together. Read more
source§impl<O> AbstractGroupAbelian<O> for Id<O>where
O: Operator,
impl<O> AbstractGroupAbelian<O> for Id<O>where
O: Operator,
source§fn prop_is_commutative_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
fn prop_is_commutative_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
Returns
true
if the operator is commutative for the given argument tuple. Approximate
equality is used for verifications. Read moresource§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> AbstractMagma<O> for Id<O>where
O: Operator,
impl<O> AbstractMagma<O> for Id<O>where
O: Operator,
source§impl<O> AbstractMonoid<O> for Id<O>where
O: Operator,
impl<O> AbstractMonoid<O> for Id<O>where
O: Operator,
source§fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq<Self>,
fn prop_operating_identity_element_is_noop_approx(args: (Self,)) -> boolwhere
Self: RelativeEq<Self>,
Checks whether operating with the identity element is a no-op for the given
argument. Approximate equality is used for verifications. Read more
source§impl<O> AbstractQuasigroup<O> for Id<O>where
O: Operator,
impl<O> AbstractQuasigroup<O> for Id<O>where
O: Operator,
source§fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
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.source§impl<O> AbstractSemigroup<O> for Id<O>where
O: Operator,
impl<O> AbstractSemigroup<O> for Id<O>where
O: Operator,
source§fn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
fn prop_is_associative_approx(args: (Self, Self, Self)) -> boolwhere
Self: RelativeEq<Self>,
Returns
true
if associativity holds for the given arguments. Approximate equality is used
for verifications. Read moresource§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> AffineTransformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> AffineTransformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
§type Rotation = Id<Multiplicative>
type Rotation = Id<Multiplicative>
Type of the first rotation to be applied.
§type NonUniformScaling = Id<Multiplicative>
type NonUniformScaling = Id<Multiplicative>
Type of the non-uniform scaling to be applied.
§type Translation = Id<Multiplicative>
type Translation = Id<Multiplicative>
The type of the pure translation part of this affine transformation.
source§fn decompose(
&self
) -> (Id<Multiplicative>, Id<Multiplicative>, Id<Multiplicative>, Id<Multiplicative>)
fn decompose(
&self
) -> (Id<Multiplicative>, Id<Multiplicative>, Id<Multiplicative>, Id<Multiplicative>)
Decomposes this affine transformation into a rotation followed by a non-uniform scaling,
followed by a rotation, followed by a translation. Read more
source§fn append_translation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Translation
) -> Id<Multiplicative>
fn append_translation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Translation
) -> Id<Multiplicative>
Appends a translation to this similarity.
source§fn prepend_translation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Translation
) -> Id<Multiplicative>
fn prepend_translation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Translation
) -> Id<Multiplicative>
Prepends a translation to this similarity.
source§fn append_rotation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Rotation
) -> Id<Multiplicative>
fn append_rotation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Rotation
) -> Id<Multiplicative>
Appends a rotation to this similarity.
source§fn prepend_rotation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Rotation
) -> Id<Multiplicative>
fn prepend_rotation(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::Rotation
) -> Id<Multiplicative>
Prepends a rotation to this similarity.
source§fn append_scaling(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::NonUniformScaling
) -> Id<Multiplicative>
fn append_scaling(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::NonUniformScaling
) -> Id<Multiplicative>
Appends a scaling factor to this similarity.
source§fn prepend_scaling(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::NonUniformScaling
) -> Id<Multiplicative>
fn prepend_scaling(
&self,
_: &<Id<Multiplicative> as AffineTransformation<E>>::NonUniformScaling
) -> Id<Multiplicative>
Prepends a scaling factor to this similarity.
source§impl Div<Id<Multiplicative>> for Id<Multiplicative>
impl Div<Id<Multiplicative>> for Id<Multiplicative>
§type Output = Id<Multiplicative>
type Output = Id<Multiplicative>
The resulting type after applying the
/
operator.source§fn div(self, _: Id<Multiplicative>) -> Id<Multiplicative>
fn div(self, _: Id<Multiplicative>) -> Id<Multiplicative>
Performs the
/
operation. Read moresource§impl DivAssign<Id<Multiplicative>> for Id<Multiplicative>
impl DivAssign<Id<Multiplicative>> for Id<Multiplicative>
source§fn div_assign(&mut self, _: Id<Multiplicative>)
fn div_assign(&mut self, _: Id<Multiplicative>)
Performs the
/=
operation. Read moresource§impl<O> JoinSemilattice for Id<O>where
O: Operator,
impl<O> JoinSemilattice for Id<O>where
O: Operator,
source§impl<O> Lattice for Id<O>where
O: Operator,
impl<O> Lattice for Id<O>where
O: Operator,
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> MeetSemilattice for Id<O>where
O: Operator,
impl<O> MeetSemilattice for Id<O>where
O: Operator,
source§impl Mul<Id<Multiplicative>> for Id<Multiplicative>
impl Mul<Id<Multiplicative>> for Id<Multiplicative>
§type Output = Id<Multiplicative>
type Output = Id<Multiplicative>
The resulting type after applying the
*
operator.source§fn mul(self, _: Id<Multiplicative>) -> Id<Multiplicative>
fn mul(self, _: Id<Multiplicative>) -> Id<Multiplicative>
Performs the
*
operation. Read moresource§impl MulAssign<Id<Multiplicative>> for Id<Multiplicative>
impl MulAssign<Id<Multiplicative>> for Id<Multiplicative>
source§fn mul_assign(&mut self, _: Id<Multiplicative>)
fn mul_assign(&mut self, _: Id<Multiplicative>)
Performs the
*=
operation. Read moresource§impl One for Id<Multiplicative>
impl One for Id<Multiplicative>
source§fn one() -> Id<Multiplicative>
fn one() -> Id<Multiplicative>
source§impl<O> PartialOrd<Id<O>> for Id<O>where
O: Operator,
impl<O> PartialOrd<Id<O>> for Id<O>where
O: Operator,
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> ProjectiveTransformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> ProjectiveTransformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
source§fn inverse_transform_point(&self, pt: &E) -> E
fn inverse_transform_point(&self, pt: &E) -> E
Applies this group’s inverse action on a point from the euclidean space.
source§fn inverse_transform_vector(
&self,
v: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn inverse_transform_vector(
&self,
v: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this group’s inverse action on a vector from the euclidean space. Read more
source§impl<O> RelativeEq<Id<O>> for Id<O>where
O: Operator,
impl<O> RelativeEq<Id<O>> for Id<O>where
O: Operator,
source§fn default_max_relative() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
fn default_max_relative() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
source§impl<E> Rotation<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> Rotation<E> for Id<Multiplicative>where
E: EuclideanSpace,
source§fn powf(&self, _: <E as EuclideanSpace>::Real) -> Option<Id<Multiplicative>>
fn powf(&self, _: <E as EuclideanSpace>::Real) -> Option<Id<Multiplicative>>
Raises this rotation to a power. If this is a simple rotation, the result must be
equivalent to multiplying the rotation angle by
n
. Read moresource§fn rotation_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates
) -> Option<Id<Multiplicative>>
fn rotation_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates
) -> Option<Id<Multiplicative>>
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
. Read moresource§fn scaled_rotation_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates,
_: <E as EuclideanSpace>::Real
) -> Option<Id<Multiplicative>>
fn scaled_rotation_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates,
_: <E as EuclideanSpace>::Real
) -> Option<Id<Multiplicative>>
source§impl<E> Scaling<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> Scaling<E> for Id<Multiplicative>where
E: EuclideanSpace,
source§fn to_real(&self) -> <E as EuclideanSpace>::Real
fn to_real(&self) -> <E as EuclideanSpace>::Real
Converts this scaling factor to a real. Same as
self.to_superset()
.source§fn from_real(r: <E as EuclideanSpace>::Real) -> Option<Self>
fn from_real(r: <E as EuclideanSpace>::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 moresource§fn powf(&self, n: <E as EuclideanSpace>::Real) -> Option<Self>
fn powf(&self, n: <E as EuclideanSpace>::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 moresource§fn scale_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates
) -> Option<Self>
fn scale_between(
a: &<E as EuclideanSpace>::Coordinates,
b: &<E as EuclideanSpace>::Coordinates
) -> Option<Self>
The scaling required to make
a
have the same norm as b
, i.e., |b| = |a| * norm_ratio(a, b)
. Read moresource§impl<E> Similarity<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> Similarity<E> for Id<Multiplicative>where
E: EuclideanSpace,
§type Scaling = Id<Multiplicative>
type Scaling = Id<Multiplicative>
The type of the pure (uniform) scaling part of this similarity transformation.
source§fn translation(
&self
) -> <Id<Multiplicative> as AffineTransformation<E>>::Translation
fn translation(
&self
) -> <Id<Multiplicative> as AffineTransformation<E>>::Translation
The pure translational component of this similarity transformation.
source§fn rotation(&self) -> <Id<Multiplicative> as AffineTransformation<E>>::Rotation
fn rotation(&self) -> <Id<Multiplicative> as AffineTransformation<E>>::Rotation
The pure rotational component of this similarity transformation.
source§fn scaling(&self) -> <Id<Multiplicative> as Similarity<E>>::Scaling
fn scaling(&self) -> <Id<Multiplicative> as Similarity<E>>::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 as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn rotate_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation’s pure rotational part to a vector.
source§fn scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::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 as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn inverse_rotate_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation inverse’s pure rotational part to a vector.
source§fn inverse_scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn inverse_scale_vector(
&self,
pt: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this transformation inverse’s pure scaling part to a vector.
source§impl<O, T> SubsetOf<T> for Id<O>where
O: Operator,
T: PartialEq<T> + Identity<O>,
impl<O, T> SubsetOf<T> for Id<O>where
O: Operator,
T: PartialEq<T> + Identity<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) -> Id<O>
unsafe fn from_superset_unchecked(_: &T) -> Id<O>
Use with care! Same as
self.to_superset
but without any property checks. Always succeeds.source§impl<E> Transformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> Transformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
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 as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
fn transform_vector(
&self,
v: &<E as EuclideanSpace>::Coordinates
) -> <E as EuclideanSpace>::Coordinates
Applies this group’s action on a vector from the euclidean space. Read more
source§impl<E> Translation<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> Translation<E> for Id<Multiplicative>where
E: EuclideanSpace,
source§fn to_vector(&self) -> <E as EuclideanSpace>::Coordinates
fn to_vector(&self) -> <E as EuclideanSpace>::Coordinates
Converts this translation to a vector.
source§fn from_vector(
v: <E as EuclideanSpace>::Coordinates
) -> Option<Id<Multiplicative>>
fn from_vector(
v: <E as EuclideanSpace>::Coordinates
) -> Option<Id<Multiplicative>>
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
. Read moresource§impl<O> UlpsEq<Id<O>> for Id<O>where
O: Operator,
impl<O> UlpsEq<Id<O>> for Id<O>where
O: Operator,
impl<O> AbstractGroup<O> for Id<O>where
O: Operator,
impl<O> AbstractLoop<O> for Id<O>where
O: Operator,
impl<O> Copy for Id<O>where
O: Operator,
impl<E> DirectIsometry<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<O> Eq for Id<O>where
O: Operator,
impl<E> Isometry<E> for Id<Multiplicative>where
E: EuclideanSpace,
impl<E> OrthogonalTransformation<E> for Id<Multiplicative>where
E: EuclideanSpace,
Auto Trait Implementations§
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<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.