pub struct SRobotQ<const N: usize, F: Float = f32>(pub [F; N]);Expand description
Statically-sized joint configuration backed by [F; N].
Tuple Fields§
§0: [F; N]Implementations§
Source§impl<const N: usize, F: Float> SRobotQ<N, F>
impl<const N: usize, F: Float> SRobotQ<N, F>
pub fn zeros() -> Self
pub fn from_array(arr: [F; N]) -> Self
pub fn as_slice(&self) -> &[F]
pub fn as_mut_slice(&mut self) -> &mut [F]
pub fn to_robotq(&self) -> RobotQ<F>
pub fn force_from_robotq(q: &RobotQ<F>) -> Self
pub fn norm(&self) -> F
pub fn dot(&self, other: &Self) -> F
pub fn map(&self, f: impl Fn(F) -> F) -> Self
pub fn sum(&self) -> F
pub fn splat(val: F) -> Self
pub fn from_fn(f: impl Fn(usize) -> F) -> Self
pub fn norm_squared(&self) -> F
pub fn normalize(&self) -> Self
pub fn distance(&self, other: &Self) -> F
pub fn distance_squared(&self, other: &Self) -> F
pub fn abs(&self) -> Self
pub fn clamp(&self, min: &Self, max: &Self) -> Self
pub fn clamp_scalar(&self, min: F, max: F) -> Self
pub fn max_element(&self) -> F
pub fn min_element(&self) -> F
pub fn linf_norm(&self) -> F
pub fn elementwise_mul(&self, other: &Self) -> Self
pub fn elementwise_div(&self, other: &Self) -> Self
pub fn zip_map(&self, other: &Self, f: impl Fn(F, F) -> F) -> Self
pub fn sqrt(&self) -> Self
pub fn mul_add(&self, mul: &Self, add: &Self) -> Self
pub fn any_non_finite(&self) -> bool
pub fn any_gt(&self, other: &Self) -> bool
pub fn any_lt(&self, other: &Self) -> bool
pub fn is_close(&self, other: &Self, tol: F) -> bool
pub fn interpolate(&self, other: &Self, t: F) -> Self
Trait Implementations§
Source§impl<const N: usize, F: Float + AbsDiffEq<Epsilon = F>> AbsDiffEq for SRobotQ<N, F>
impl<const N: usize, F: Float + AbsDiffEq<Epsilon = F>> AbsDiffEq for SRobotQ<N, F>
Source§fn default_epsilon() -> F
fn default_epsilon() -> F
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: F) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: F) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl<const N: usize, F: Float> AddAssign for SRobotQ<N, F>
impl<const N: usize, F: Float> AddAssign for SRobotQ<N, F>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl<const N: usize, F: Copy + Float> Copy for SRobotQ<N, F>
Source§impl<const N: usize, F: Float> DivAssign<F> for SRobotQ<N, F>
impl<const N: usize, F: Float> DivAssign<F> for SRobotQ<N, F>
Source§fn div_assign(&mut self, rhs: F)
fn div_assign(&mut self, rhs: F)
Performs the
/= operation. Read moreSource§impl<const N: usize> DivAssign<f32> for SRobotQ<N, f64>
impl<const N: usize> DivAssign<f32> for SRobotQ<N, f64>
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/= operation. Read moreSource§impl<const N: usize> DivAssign<f64> for SRobotQ<N, f32>
impl<const N: usize> DivAssign<f64> for SRobotQ<N, f32>
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl<const N: usize, F: Float> MulAssign<F> for SRobotQ<N, F>
impl<const N: usize, F: Float> MulAssign<F> for SRobotQ<N, F>
Source§fn mul_assign(&mut self, rhs: F)
fn mul_assign(&mut self, rhs: F)
Performs the
*= operation. Read moreSource§impl<const N: usize> MulAssign<f32> for SRobotQ<N, f64>
impl<const N: usize> MulAssign<f32> for SRobotQ<N, f64>
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreSource§impl<const N: usize> MulAssign<f64> for SRobotQ<N, f32>
impl<const N: usize> MulAssign<f64> for SRobotQ<N, f32>
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl<const N: usize, F: PartialEq + Float> PartialEq for SRobotQ<N, F>
impl<const N: usize, F: PartialEq + Float> PartialEq for SRobotQ<N, F>
Source§impl<const N: usize, F: Float + RelativeEq + AbsDiffEq<Epsilon = F>> RelativeEq for SRobotQ<N, F>
impl<const N: usize, F: Float + RelativeEq + AbsDiffEq<Epsilon = F>> RelativeEq for SRobotQ<N, F>
Source§fn default_max_relative() -> F
fn default_max_relative() -> F
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(&self, other: &Self, epsilon: F, max_relative: F) -> bool
fn relative_eq(&self, other: &Self, epsilon: F, max_relative: F) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.impl<const N: usize, F: PartialEq + Float> StructuralPartialEq for SRobotQ<N, F>
Source§impl<const N: usize, F: Float> SubAssign for SRobotQ<N, F>
impl<const N: usize, F: Float> SubAssign for SRobotQ<N, F>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl<const N: usize, F: Float> TryFrom<&ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for SRobotQ<N, F>
impl<const N: usize, F: Float> TryFrom<&ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for SRobotQ<N, F>
Source§impl<const N: usize> TryFrom<&ArrayBase<OwnedRepr<f32>, Dim<[usize; 1]>>> for SRobotQ<N, f64>
impl<const N: usize> TryFrom<&ArrayBase<OwnedRepr<f32>, Dim<[usize; 1]>>> for SRobotQ<N, f64>
Source§impl<const N: usize> TryFrom<&ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for SRobotQ<N, f32>
impl<const N: usize> TryFrom<&ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for SRobotQ<N, f32>
Source§impl<const N: usize, F: Float> TryFrom<ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for SRobotQ<N, F>
impl<const N: usize, F: Float> TryFrom<ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for SRobotQ<N, F>
Source§impl<const N: usize, F: Float + UlpsEq + AbsDiffEq<Epsilon = F>> UlpsEq for SRobotQ<N, F>
impl<const N: usize, F: Float + UlpsEq + AbsDiffEq<Epsilon = F>> UlpsEq for SRobotQ<N, F>
Auto Trait Implementations§
impl<const N: usize, F> Freeze for SRobotQ<N, F>where
F: Freeze,
impl<const N: usize, F> RefUnwindSafe for SRobotQ<N, F>where
F: RefUnwindSafe,
impl<const N: usize, F> Send for SRobotQ<N, F>where
F: Send,
impl<const N: usize, F> Sync for SRobotQ<N, F>where
F: Sync,
impl<const N: usize, F> Unpin for SRobotQ<N, F>where
F: Unpin,
impl<const N: usize, F> UnsafeUnpin for SRobotQ<N, F>where
F: UnsafeUnpin,
impl<const N: usize, F> UnwindSafe for SRobotQ<N, F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
Source§impl<A, T> AsMutBits<T> for A
impl<A, T> AsMutBits<T> for A
Source§fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
Views
self as a mutable bit-slice region with the O ordering.Source§fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
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,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<const N: usize, T, E, F> SRobotQLike<N, E, F> for T
impl<const N: usize, T, E, F> SRobotQLike<N, E, F> for T
fn to_srobotq(self) -> Result<SRobotQ<N, F>, E>
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.