Struct ella_tensor::Const
source · pub struct Const<const D: usize>(pub [usize; D]);Tuple Fields§
§0: [usize; D]Trait Implementations§
source§impl<__AsMutT, const D: usize> AsMut<__AsMutT> for Const<D>where
[usize; D]: AsMut<__AsMutT>,
__AsMutT: ?Sized,
impl<__AsMutT, const D: usize> AsMut<__AsMutT> for Const<D>where [usize; D]: AsMut<__AsMutT>, __AsMutT: ?Sized,
source§fn as_mut(&mut self) -> &mut __AsMutT
fn as_mut(&mut self) -> &mut __AsMutT
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<__AsRefT, const D: usize> AsRef<__AsRefT> for Const<D>where
[usize; D]: AsRef<__AsRefT>,
__AsRefT: ?Sized,
impl<__AsRefT, const D: usize> AsRef<__AsRefT> for Const<D>where [usize; D]: AsRef<__AsRefT>, __AsRefT: ?Sized,
source§impl<__IdxT, const D: usize> IndexMut<__IdxT> for Const<D>where
[usize; D]: IndexMut<__IdxT>,
impl<__IdxT, const D: usize> IndexMut<__IdxT> for Const<D>where [usize; D]: IndexMut<__IdxT>,
source§impl<I> Indexer<Const<1>> for Iwhere
I: IndexValue,
impl<I> Indexer<Const<1>> for Iwhere I: IndexValue,
source§impl<A, B> Indexer<Const<2>> for (A, B)where
A: IndexValue,
B: IndexValue,
impl<A, B> Indexer<Const<2>> for (A, B)where A: IndexValue, B: IndexValue,
source§impl<A, B, C> Indexer<Const<3>> for (A, B, C)where
A: IndexValue,
B: IndexValue,
C: IndexValue,
impl<A, B, C> Indexer<Const<3>> for (A, B, C)where A: IndexValue, B: IndexValue, C: IndexValue,
source§impl<A, B, C, D> Indexer<Const<4>> for (A, B, C, D)where
A: IndexValue,
B: IndexValue,
C: IndexValue,
D: IndexValue,
impl<A, B, C, D> Indexer<Const<4>> for (A, B, C, D)where A: IndexValue, B: IndexValue, C: IndexValue, D: IndexValue,
source§impl<A, B, C, D, E> Indexer<Const<5>> for (A, B, C, D, E)where
A: IndexValue,
B: IndexValue,
C: IndexValue,
D: IndexValue,
E: IndexValue,
impl<A, B, C, D, E> Indexer<Const<5>> for (A, B, C, D, E)where A: IndexValue, B: IndexValue, C: IndexValue, D: IndexValue, E: IndexValue,
source§impl<A, B, C, D, E, F> Indexer<Const<6>> for (A, B, C, D, E, F)where
A: IndexValue,
B: IndexValue,
C: IndexValue,
D: IndexValue,
E: IndexValue,
F: IndexValue,
impl<A, B, C, D, E, F> Indexer<Const<6>> for (A, B, C, D, E, F)where A: IndexValue, B: IndexValue, C: IndexValue, D: IndexValue, E: IndexValue, F: IndexValue,
source§impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime Const<D>
impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime Const<D>
source§impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime mut Const<D>
impl<'__deriveMoreLifetime, const D: usize> IntoIterator for &'__deriveMoreLifetime mut Const<D>
source§impl<const D: usize> IntoIterator for Const<D>
impl<const D: usize> IntoIterator for Const<D>
source§impl<const D: usize> PartialEq<Const<D>> for Const<D>
impl<const D: usize> PartialEq<Const<D>> for Const<D>
source§impl RemoveAxis for Const<1>
impl RemoveAxis for Const<1>
source§impl RemoveAxis for Const<2>
impl RemoveAxis for Const<2>
source§impl RemoveAxis for Const<3>
impl RemoveAxis for Const<3>
source§impl RemoveAxis for Const<4>
impl RemoveAxis for Const<4>
source§impl RemoveAxis for Const<5>
impl RemoveAxis for Const<5>
source§impl RemoveAxis for Const<6>
impl RemoveAxis for Const<6>
source§impl Shape for Const<0>
impl Shape for Const<0>
const NDIM: Option<usize> = Some(0)
type Smaller = Const<0>
type Larger = Const<ella_common::::shape::{impl#42}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<0>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<1>
impl Shape for Const<1>
const NDIM: Option<usize> = Some(1)
type Smaller = Const<ella_common::::shape::{impl#45}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#45}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<1>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<2>
impl Shape for Const<2>
const NDIM: Option<usize> = Some(2)
type Smaller = Const<ella_common::::shape::{impl#48}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#48}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<2>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<3>
impl Shape for Const<3>
const NDIM: Option<usize> = Some(3)
type Smaller = Const<ella_common::::shape::{impl#51}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#51}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<3>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<4>
impl Shape for Const<4>
const NDIM: Option<usize> = Some(4)
type Smaller = Const<ella_common::::shape::{impl#54}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#54}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<4>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<5>
impl Shape for Const<5>
const NDIM: Option<usize> = Some(5)
type Smaller = Const<ella_common::::shape::{impl#57}::Smaller::{constant#0}>
type Larger = Const<ella_common::::shape::{impl#57}::Larger::{constant#0}>
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<5>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
source§impl Shape for Const<6>
impl Shape for Const<6>
const NDIM: Option<usize> = Some(6)
type Smaller = Const<ella_common::::shape::{impl#60}::Smaller::{constant#0}>
type Larger = Dyn
fn ndim(&self) -> usize
fn size(&self) -> usize
fn zeros(_ndim: usize) -> Const<6>
fn slice(&self) -> &[usize]
fn slice_mut(&mut self) -> &mut [usize]
fn as_dyn(&self) -> Dyn
fn broadcast<In, Out>(&self, other: &In) -> Result<Out, Error>where In: Shape, Out: Shape,
fn indices(&self) -> ShapeIndexIter<Self> ⓘ
fn axis(&self, axis: Axis) -> usize
impl<const D: usize> Eq for Const<D>
impl<const D: usize> StructuralEq for Const<D>
impl<const D: usize> StructuralPartialEq for Const<D>
Auto Trait Implementations§
impl<const D: usize> RefUnwindSafe for Const<D>
impl<const D: usize> Send for Const<D>
impl<const D: usize> Sync for Const<D>
impl<const D: usize> Unpin for Const<D>
impl<const D: usize> UnwindSafe for Const<D>
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.