pub struct D4;
Expand description
Four dimensions.
Trait Implementations§
Source§impl Card<D4> for RectangularCardD4
impl Card<D4> for RectangularCardD4
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<<D4 as Dim>::CardIdx>) -> usize
fn cardinality_of(&self, idx: impl Into<<D4 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<<D4 as Dim>::PrevDim>
fn child_card(&self, i: usize) -> impl Card<<D4 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(<<D4 as Dim>::PrevDim as Dim>::Idx) -> T
fn child_fun<T, F>( &self, i: usize, fun: F, ) -> impl Fn(<<D4 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: V3<usize>> Card<D4> for VariableCardD4<V>
impl<V: V3<usize>> Card<D4> for VariableCardD4<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<<D4 as Dim>::CardIdx>) -> usize
fn cardinality_of(&self, idx: impl Into<<D4 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<<D4 as Dim>::PrevDim>
fn child_card(&self, i: usize) -> impl Card<<D4 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(<<D4 as Dim>::PrevDim as Dim>::Idx) -> T
fn child_fun<T, F>( &self, i: usize, fun: F, ) -> impl Fn(<<D4 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<D4> for IdxLeqD3
impl CardIdx<D4> for IdxLeqD3
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<D4, T>) -> usize
fn card<T>(self, vec: &impl NVecCore<D4, T>) -> usize
Returns the cardinality of the given
vec
at this index.Source§fn card_equality<T>(
a: &impl NVecCore<D4, T>,
b: &impl NVecCore<D4, T>,
) -> CardEquality<D4>
fn card_equality<T>( a: &impl NVecCore<D4, T>, b: &impl NVecCore<D4, T>, ) -> CardEquality<D4>
Returns the cardinality equality of the given vectors
a
and b
at this index.Source§impl Dim for D4
impl Dim for D4
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 = IdxLeqD3
type CardIdx = IdxLeqD3
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<D4, T> for &'a [C]
impl<'a, C, T> NVec<D4, T> for &'a [C]
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D4 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<D4, T> for &'a mut [C]
impl<'a, C, T> NVec<D4, T> for &'a mut [C]
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D4 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<D4, T> for [C; N]
impl<const N: usize, C, T> NVec<D4, T> for [C; N]
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D4 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<D4, T> for CachedVec<D4, T, V, C>
impl<T, V, C> NVec<D4, T> for CachedVec<D4, T, V, C>
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: <D4 as Dim>::ChildIdx) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: <D4 as Dim>::ChildIdx) -> impl NVec<<D4 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<D4, T> for SparseVec<D4, T, C, L>
impl<T, L, C> NVec<D4, T> for SparseVec<D4, T, C, L>
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn in_bounds(&self, idx: impl Into<<D4 as Dim>::LeqIdx>) -> bool
fn in_bounds(&self, idx: impl Into<<D4 as Dim>::LeqIdx>) -> bool
Returns whether or not the given
idx
is in bounds. Read moreSource§fn child(&self, i: <D4 as Dim>::ChildIdx) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: <D4 as Dim>::ChildIdx) -> impl NVec<<D4 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<D4, T> for Vec<C>
impl<T, C> NVec<D4, T> for Vec<C>
Source§fn at(&self, idx: impl IntoIdx<D4>) -> T
fn at(&self, idx: impl IntoIdx<D4>) -> T
Returns the element at the
idx
-th position of the vector. Read moreSource§fn child(&self, i: usize) -> impl NVec<<D4 as Dim>::PrevDim, T>
fn child(&self, i: usize) -> impl NVec<<D4 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<D4, T> for &'a mut [C]
impl<'a, C, T> NVecMut<D4, T> for &'a mut [C]
Source§fn at_mut<Idx: IntoIdx<D4>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D4>>(&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: <D4 as Dim>::ChildIdx,
) -> impl NVecMut<<D4 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D4 as Dim>::ChildIdx, ) -> impl NVecMut<<D4 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<D4, T> for [C; N]
impl<const N: usize, C, T> NVecMut<D4, T> for [C; N]
Source§fn at_mut<Idx: IntoIdx<D4>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D4>>(&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: <D4 as Dim>::ChildIdx,
) -> impl NVecMut<<D4 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D4 as Dim>::ChildIdx, ) -> impl NVecMut<<D4 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<D4, T> for SparseVec<D4, T, C, L>
impl<T, L, C> NVecMut<D4, T> for SparseVec<D4, T, C, L>
Source§fn at_mut<Idx: IntoIdx<D4>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D4>>(&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: <D4 as Dim>::ChildIdx,
) -> impl NVecMut<<D4 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D4 as Dim>::ChildIdx, ) -> impl NVecMut<<D4 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<D4, T> for Vec<C>
impl<T, C> NVecMut<D4, T> for Vec<C>
Source§fn at_mut<Idx: IntoIdx<D4>>(&mut self, idx: Idx) -> &mut T
fn at_mut<Idx: IntoIdx<D4>>(&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: <D4 as Dim>::ChildIdx,
) -> impl NVecMut<<D4 as Dim>::PrevDim, T>
fn child_mut( &mut self, i: <D4 as Dim>::ChildIdx, ) -> impl NVecMut<<D4 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 D4
impl StructuralPartialEq for D4
Auto Trait Implementations§
impl Freeze for D4
impl RefUnwindSafe for D4
impl Send for D4
impl Sync for D4
impl Unpin for D4
impl UnwindSafe for D4
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