Trait afarray::ArrayInstance
source · [−]pub trait ArrayInstance: Deref<Target = Array<Self::DType>> + DerefMut {
type DType: HasAfEnum;
fn af_cast<T: HasAfEnum>(&self) -> Array<T> { ... }
fn len(&self) -> usize { ... }
fn get(&self, index: Indexer<'_>) -> Array<Self::DType> { ... }
fn set<T: ArrayInstance<DType = Self::DType>>(
&mut self,
index: &Indexer<'_>,
other: &T
) { ... }
fn set_at(&mut self, offset: usize, value: Self::DType) { ... }
fn to_vec(&self) -> Vec<Self::DType>
where
Self::DType: Clone + Default,
{ ... }
}
Expand description
Defines common access methods for instance of ArrayExt
.
Associated Types
Provided methods
Get the values specified by the given af::Indexer
.
Set the values specified by the given af::Indexer
to the corresponding values in T
.
Set the value at the specified index to value
.