Struct TensorRank1Vec2D

Source
pub struct TensorRank1Vec2D<const D: usize, const I: usize>(/* private fields */);
Expand description

A 2D vector of d-dimensional tensors of rank 1.

D is the dimension, I is the configuration.

Implementations§

Source§

impl<const D: usize, const I: usize> TensorRank1Vec2D<D, I>

Source

pub fn iter(&self) -> impl Iterator<Item = &TensorRank1Vec<D, I>>

Source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut TensorRank1Vec<D, I>>

Trait Implementations§

Source§

impl<const D: usize, const I: usize> Clone for TensorRank1Vec2D<D, I>

Source§

fn clone(&self) -> TensorRank1Vec2D<D, I>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const D: usize, const I: usize> Debug for TensorRank1Vec2D<D, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const D: usize, const I: usize> FromIterator<TensorRank1Vec<D, I>> for TensorRank1Vec2D<D, I>

Source§

fn from_iter<Ii: IntoIterator<Item = TensorRank1Vec<D, I>>>( into_iterator: Ii, ) -> Self

Creates a value from an iterator. Read more
Source§

impl<const D: usize, const I: usize> Index<usize> for TensorRank1Vec2D<D, I>

Source§

type Output = TensorRank1Vec<D, I>

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const D: usize, const I: usize> IndexMut<usize> for TensorRank1Vec2D<D, I>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const D: usize, const I: usize> TensorVec for TensorRank1Vec2D<D, I>

Source§

type Item = TensorRank1Vec<D, I>

The type of item encountered when iterating over the tensor.
Source§

type Slice<'a> = &'a [&'a [[f64; D]]]

The type of slice corresponding to the tensor.
Source§

fn append(&mut self, other: &mut Self)

Moves all the items of other into self, leaving other empty.
Source§

fn is_empty(&self) -> bool

Returns true if the vector contains no items.
Source§

fn len(&self) -> usize

Returns the number of items in the vector, also referred to as its ‘length’.
Source§

fn new(slice: Self::Slice<'_>) -> Self

Returns a tensor given a slice.
Source§

fn push(&mut self, item: Self::Item)

Appends an item to the back of the Vec.
Source§

fn zero(len: usize) -> Self

Returns the zero tensor.

Auto Trait Implementations§

§

impl<const D: usize, const I: usize> Freeze for TensorRank1Vec2D<D, I>

§

impl<const D: usize, const I: usize> RefUnwindSafe for TensorRank1Vec2D<D, I>

§

impl<const D: usize, const I: usize> Send for TensorRank1Vec2D<D, I>

§

impl<const D: usize, const I: usize> Sync for TensorRank1Vec2D<D, I>

§

impl<const D: usize, const I: usize> Unpin for TensorRank1Vec2D<D, I>

§

impl<const D: usize, const I: usize> UnwindSafe for TensorRank1Vec2D<D, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<A, Y, U> OdeSolver<Y, U> for A
where A: Debug, Y: Tensor, U: TensorVec<Item = Y>,