Trait nalgebra::Indexable
[−]
[src]
pub trait Indexable<I, N>: Shape<I> + IndexMut<I, Output=N> { fn swap(&mut self, i: I, j: I); unsafe fn unsafe_at(&self, i: I) -> N; unsafe fn unsafe_set(&mut self, i: I, N); }
This is a workaround of current Rust limitations.
It exists because the I
trait cannot be used to express write access.
Thus, this is the same as the I
trait but without the syntactic sugar and with a method
to write to a specific index.
Required Methods
fn swap(&mut self, i: I, j: I)
Swaps the i
-th element of self
with its j
-th element.
unsafe fn unsafe_at(&self, i: I) -> N
Reads the i
-th element of self
.
i
is not checked.
unsafe fn unsafe_set(&mut self, i: I, N)
Writes to the i
-th element of self
.
i
is not checked.
Implementors
impl<N: Copy> Indexable<(usize, usize), N> for DMat<N>
impl<N: Copy> Indexable<usize, N> for DVec<N>
impl<N: Copy> Indexable<usize, N> for DVec1<N>
impl<N: Copy> Indexable<usize, N> for DVec2<N>
impl<N: Copy> Indexable<usize, N> for DVec3<N>
impl<N: Copy> Indexable<usize, N> for DVec4<N>
impl<N: Copy> Indexable<usize, N> for DVec5<N>
impl<N: Copy> Indexable<usize, N> for DVec6<N>
impl<N: Copy> Indexable<usize, N> for Vec1<N>
impl<N: Copy> Indexable<usize, N> for Vec2<N>
impl<N: Copy> Indexable<usize, N> for Vec3<N>
impl<N: Copy> Indexable<usize, N> for Vec4<N>
impl<N: Copy> Indexable<usize, N> for Vec5<N>
impl<N: Copy> Indexable<usize, N> for Vec6<N>
impl<N: Copy> Indexable<usize, N> for Pnt1<N>
impl<N: Copy> Indexable<usize, N> for Pnt2<N>
impl<N: Copy> Indexable<usize, N> for Pnt3<N>
impl<N: Copy> Indexable<usize, N> for Pnt4<N>
impl<N: Copy> Indexable<usize, N> for Pnt5<N>
impl<N: Copy> Indexable<usize, N> for Pnt6<N>
impl<N: Copy> Indexable<usize, N> for Quat<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat1<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat2<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat3<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat4<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat5<N>
impl<N: Copy> Indexable<(usize, usize), N> for Mat6<N>