pub struct D3;
Expand description
Three dimensions.
Trait Implementations§
Source§impl Card<D3> for RectangularCardD3
impl Card<D3> for RectangularCardD3
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns true if the cardinality is bounded and rectangular; i.e, Read more
Source§fn cardinality_of(&self, idx: impl Into<<D3 as Dim>::CardIdx>) -> usize
fn cardinality_of(&self, idx: impl Into<<D3 as Dim>::CardIdx>) -> usize
Returns the cardinality of the child of the vector at the given
idx
.Source§fn child_card(&self, i: usize) -> impl Card<<D3 as Dim>::PrevDim>
fn child_card(&self, i: usize) -> impl Card<<D3 as Dim>::PrevDim>
Returns the cardinality of the child of this vector at the given
left_most_idx
.Source§fn child_fun<T, F>(
&self,
i: usize,
fun: F,
) -> impl Fn(<<D3 as Dim>::PrevDim as Dim>::Idx) -> T
fn child_fun<T, F>( &self, i: usize, fun: F, ) -> impl Fn(<<D3 as Dim>::PrevDim as Dim>::Idx) -> T
Creates a function, say
new_fun
, which applies the first of the indices to
left_most_index
such that: Read moreSource§impl<V: V2<usize>> Card<D3> for VariableCardD3<V>
impl<V: V2<usize>> Card<D3> for VariableCardD3<V>
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns true if the cardinality is bounded and rectangular; i.e, Read more
Source§fn cardinality_of(&self, idx: impl Into<<D3 as Dim>::CardIdx>) -> usize
fn cardinality_of(&self, idx: impl Into<<D3 as Dim>::CardIdx>) -> usize
Returns the cardinality of the child of the vector at the given
idx
.Source§fn child_card(&self, i: usize) -> impl Card<<D3 as Dim>::PrevDim>
fn child_card(&self, i: usize) -> impl Card<<D3 as Dim>::PrevDim>
Returns the cardinality of the child of this vector at the given
left_most_idx
.Source§fn child_fun<T, F>(
&self,
i: usize,
fun: F,
) -> impl Fn(<<D3 as Dim>::PrevDim as Dim>::Idx) -> T
fn child_fun<T, F>( &self, i: usize, fun: F, ) -> impl Fn(<<D3 as Dim>::PrevDim as Dim>::Idx) -> T
Creates a function, say
new_fun
, which applies the first of the indices to
left_most_index
such that: Read moreSource§impl CardIdx<D3> for IdxLeqD2
impl CardIdx<D3> for IdxLeqD2
Source§fn is_d0(&self) -> bool
fn is_d0(&self) -> bool
Returns whether or not the index is of dimension 0; i.e., has type
[usize; 0]
.Source§fn card<T>(self, vec: &impl NVecCore<D3, T>) -> usize
fn card<T>(self, vec: &impl NVecCore<D3, T>) -> usize
Returns the cardinality of the given
vec
at this index.Source§fn card_equality<T>(
a: &impl NVecCore<D3, T>,
b: &impl NVecCore<D3, T>,
) -> CardEquality<D3>
fn card_equality<T>( a: &impl NVecCore<D3, T>, b: &impl NVecCore<D3, T>, ) -> CardEquality<D3>
Returns the cardinality equality of the given vectors
a
and b
at this index.Source§impl Dim for D3
impl Dim for D3
Source§type ChildIdx = usize
type ChildIdx = usize
Index to reach a child of a structure with this dimension,
while the child belongs to the previous dimension.
Source§type CardIdx = IdxLeqD2
type CardIdx = IdxLeqD2
Union of indices that can be used to query cardinality of the vector’s
any lower dimension children. Read more
Source§fn left_join_from_lower_dim(
left_most_idx: usize,
lower_idx: <Self::PrevDim as Dim>::Idx,
) -> Self::Idx
fn left_join_from_lower_dim( left_most_idx: usize, lower_idx: <Self::PrevDim as Dim>::Idx, ) -> Self::Idx
Left joins the
left_most_idx
to lover_idx
of dimension say N
to
get the index of dimension N+1
.Source§impl<'a, C, T> NVec<D3, T> for &'a [C]
impl<'a, C, T> NVec<D3, T> for &'a [C]
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<'a, C, T> NVec<D3, T> for &'a mut [C]
impl<'a, C, T> NVec<D3, T> for &'a mut [C]
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<const N: usize, C, T> NVec<D3, T> for [C; N]
impl<const N: usize, C, T> NVec<D3, T> for [C; N]
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<T, V, C> NVec<D3, T> for CachedVec<D3, T, V, C>
impl<T, V, C> NVec<D3, T> for CachedVec<D3, T, V, C>
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: <D3 as Dim>::ChildIdx) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: <D3 as Dim>::ChildIdx) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<T, L, C> NVec<D3, T> for SparseVec<D3, T, C, L>
impl<T, L, C> NVec<D3, T> for SparseVec<D3, T, C, L>
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn in_bounds(&self, idx: impl Into<<D3 as Dim>::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<<D3 as Dim>::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn child(&self, i: <D3 as Dim>::ChildIdx) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: <D3 as Dim>::ChildIdx) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<T, C> NVec<D3, T> for Vec<C>
impl<T, C> NVec<D3, T> for Vec<C>
Source§fn at(&self, idx: impl IntoIdx<D3>) -> T
fn at(&self, idx: impl IntoIdx<D3>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D3 as Dim>::PrevDim, T>
Returns the
i
-th child of the vector. Read moreSource§fn all(&self) -> impl Iterator<Item = T>
fn all(&self) -> impl Iterator<Item = T>
Returns a flattened iterator over all scalar (D0) elements of the vector. Read more
Source§fn num_children(&self) -> usize
fn num_children(&self) -> usize
Returns the number of children of the vector; i.e., number of
elements of the one lower dimension. Read more
Source§fn card(&self, idx: impl Into<D::CardIdx>) -> usize
fn card(&self, idx: impl Into<D::CardIdx>) -> usize
Returns the cardinality of the vec in any of the lower dimensions. Read more
Source§fn is_bounded(&self) -> bool
fn is_bounded(&self) -> bool
Returns whether or not the vector is bounded. Read more
Source§fn is_rectangular(&self) -> bool
fn is_rectangular(&self) -> bool
Returns whether or not the cardinalities of the vector are rectangular.
A rectangular vector of dimension
D
has the same number of children
at a given lower dimension for all indices. Read moreSource§fn is_unbounded(&self) -> bool
fn is_unbounded(&self) -> bool
Returns whether or not the vector is unbounded. Read more
Source§fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<D::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
fn card_equality(&self, other: &impl NVec<D, T>) -> CardEquality<D>
Returns the cardinality equality of this vec with the
other
: Read moreSource§fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
fn try_at(&self, idx: impl IntoIdx<D>) -> Option<T>
Returns the element at the
idx
-th position of the vector if the
index is in_bounds
; returns None otherwise. Read moreSource§fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
fn equality(&self, other: &impl NVec<D, T>) -> Equality<D>where
T: PartialEq,
Returns the equality of this vec with the
other
: Read moreSource§impl<'a, C, T> NVecMut<D3, T> for &'a mut [C]
impl<'a, C, T> NVecMut<D3, T> for &'a mut [C]
Source§fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
Returns a mutable reference to the element at the
idx
-th
position of the vector. Read moreSource§fn child_mut(
&mut self,
i: <D3 as Dim>::ChildIdx,
) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D3 as Dim>::ChildIdx, ) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
Returns a mutable reference to the
i
-th child of the vector. Read moreSource§fn mut_all<F>(&mut self, f: F)
fn mut_all<F>(&mut self, f: F)
Applies the mutating function
f
over all scalar elements of the vector. Read moreSource§impl<const N: usize, C, T> NVecMut<D3, T> for [C; N]
impl<const N: usize, C, T> NVecMut<D3, T> for [C; N]
Source§fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
Returns a mutable reference to the element at the
idx
-th
position of the vector. Read moreSource§fn child_mut(
&mut self,
i: <D3 as Dim>::ChildIdx,
) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D3 as Dim>::ChildIdx, ) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
Returns a mutable reference to the
i
-th child of the vector. Read moreSource§fn mut_all<F>(&mut self, f: F)
fn mut_all<F>(&mut self, f: F)
Applies the mutating function
f
over all scalar elements of the vector. Read moreSource§impl<T, L, C> NVecMut<D3, T> for SparseVec<D3, T, C, L>
impl<T, L, C> NVecMut<D3, T> for SparseVec<D3, T, C, L>
Source§fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
Returns a mutable reference to the element at the
idx
-th
position of the vector. Read moreSource§fn child_mut(
&mut self,
i: <D3 as Dim>::ChildIdx,
) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D3 as Dim>::ChildIdx, ) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
Returns a mutable reference to the
i
-th child of the vector. Read moreSource§fn mut_all<F>(&mut self, f: F)
fn mut_all<F>(&mut self, f: F)
Applies the mutating function
f
over all scalar elements of the vector. Read moreSource§impl<T, C> NVecMut<D3, T> for Vec<C>
impl<T, C> NVecMut<D3, T> for Vec<C>
Source§fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D3>>(&mut self, idx: Idx) -> &mut T
Returns a mutable reference to the element at the
idx
-th
position of the vector. Read moreSource§fn child_mut(
&mut self,
i: <D3 as Dim>::ChildIdx,
) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D3 as Dim>::ChildIdx, ) -> impl NVecMut<<D3 as Dim>::PrevDim, T>
Returns a mutable reference to the
i
-th child of the vector. Read moreSource§fn mut_all<F>(&mut self, f: F)
fn mut_all<F>(&mut self, f: F)
Applies the mutating function
f
over all scalar elements of the vector. Read moreimpl Copy for D3
impl StructuralPartialEq for D3
Auto Trait Implementations§
impl Freeze for D3
impl RefUnwindSafe for D3
impl Send for D3
impl Sync for D3
impl Unpin for D3
impl UnwindSafe for D3
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