pub struct SRobotQ<const N: usize, T: Float = f32>(pub [T; N]);Expand description
Statically-sized joint configuration backed by [T; N].
Tuple Fields§
§0: [T; N]Implementations§
Source§impl<const N: usize, T: Float> SRobotQ<N, T>
impl<const N: usize, T: Float> SRobotQ<N, T>
pub fn zeros() -> Self
pub fn from_array(arr: [T; N]) -> Self
pub fn as_slice(&self) -> &[T]
pub fn as_mut_slice(&mut self) -> &mut [T]
pub fn to_robotq(&self) -> RobotQ<T>
pub fn force_from_robotq(q: &RobotQ<T>) -> Self
pub fn norm(&self) -> T
pub fn dot(&self, other: &Self) -> T
pub fn map(&self, f: impl Fn(T) -> T) -> Self
pub fn sum(&self) -> T
pub fn splat(val: T) -> Self
pub fn from_fn(f: impl Fn(usize) -> T) -> Self
pub fn norm_squared(&self) -> T
pub fn normalize(&self) -> Self
pub fn distance(&self, other: &Self) -> T
pub fn distance_squared(&self, other: &Self) -> T
pub fn abs(&self) -> Self
pub fn clamp(&self, min: &Self, max: &Self) -> Self
pub fn clamp_scalar(&self, min: T, max: T) -> Self
pub fn max_element(&self) -> T
pub fn min_element(&self) -> T
pub fn linf_norm(&self) -> T
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(T, T) -> T) -> 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: T) -> bool
pub fn interpolate(&self, other: &Self, t: T) -> Self
Trait Implementations§
Source§impl<const N: usize, T: Float + AbsDiffEq<Epsilon = T>> AbsDiffEq for SRobotQ<N, T>
impl<const N: usize, T: Float + AbsDiffEq<Epsilon = T>> AbsDiffEq for SRobotQ<N, T>
Source§fn default_epsilon() -> T
fn default_epsilon() -> T
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: T) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: T) -> 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, T: Float> AddAssign for SRobotQ<N, T>
impl<const N: usize, T: Float> AddAssign for SRobotQ<N, T>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<const N: usize, T: Float> DivAssign<T> for SRobotQ<N, T>
impl<const N: usize, T: Float> DivAssign<T> for SRobotQ<N, T>
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
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, T: Float> MulAssign<T> for SRobotQ<N, T>
impl<const N: usize, T: Float> MulAssign<T> for SRobotQ<N, T>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
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, T: Float + RelativeEq + AbsDiffEq<Epsilon = T>> RelativeEq for SRobotQ<N, T>
impl<const N: usize, T: Float + RelativeEq + AbsDiffEq<Epsilon = T>> RelativeEq for SRobotQ<N, T>
Source§fn default_max_relative() -> T
fn default_max_relative() -> T
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(&self, other: &Self, epsilon: T, max_relative: T) -> bool
fn relative_eq(&self, other: &Self, epsilon: T, max_relative: T) -> 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.Source§impl<const N: usize, T: Float> SubAssign for SRobotQ<N, T>
impl<const N: usize, T: Float> SubAssign for SRobotQ<N, T>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl<const N: usize, T: Float> TryFrom<&ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for SRobotQ<N, T>
impl<const N: usize, T: Float> TryFrom<&ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for SRobotQ<N, T>
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, T: Float> TryFrom<ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for SRobotQ<N, T>
impl<const N: usize, T: Float> TryFrom<ArrayBase<OwnedRepr<T>, Dim<[usize; 1]>>> for SRobotQ<N, T>
Source§impl<const N: usize, T: Float + UlpsEq + AbsDiffEq<Epsilon = T>> UlpsEq for SRobotQ<N, T>
impl<const N: usize, T: Float + UlpsEq + AbsDiffEq<Epsilon = T>> UlpsEq for SRobotQ<N, T>
impl<const N: usize, T: Copy + Float> Copy for SRobotQ<N, T>
impl<const N: usize, T: Float> StructuralPartialEq for SRobotQ<N, T>
Auto Trait Implementations§
impl<const N: usize, T> Freeze for SRobotQ<N, T>where
T: Freeze,
impl<const N: usize, T> RefUnwindSafe for SRobotQ<N, T>where
T: RefUnwindSafe,
impl<const N: usize, T> Send for SRobotQ<N, T>where
T: Send,
impl<const N: usize, T> Sync for SRobotQ<N, T>where
T: Sync,
impl<const N: usize, T> Unpin for SRobotQ<N, T>where
T: Unpin,
impl<const N: usize, T> UnsafeUnpin for SRobotQ<N, T>where
T: UnsafeUnpin,
impl<const N: usize, T> UnwindSafe for SRobotQ<N, T>where
T: 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