Struct Matrix

Source
pub struct Matrix<T: RDSTyped> { /* private fields */ }

Trait Implementations§

Source§

impl<T: RDSTyped> Display for Matrix<T>

Source§

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

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

impl<I, T> Index<I> for Matrix<T>
where I: AsRef<[usize]>, T: RDSTyped,

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, i: I) -> &T

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

impl<I, T> IndexMut<I> for Matrix<T>
where I: AsRef<[usize]>, T: RDSTyped,

Source§

fn index_mut(&mut self, i: I) -> &mut T

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

impl<T: RDSTyped> Tensor<T> for Matrix<T>

Source§

fn from_scalar<R: AsRef<[usize]>>(shape: R, s: T) -> Self

Source§

fn from_tensor<W: Tensor<S>, S: RDSTyped + CastTo<T>>(tensor: &W) -> Self

Source§

fn from_slice<R: AsRef<[usize]>, S: AsRef<[T]>>(shape: R, slice: S) -> Self

Source§

fn from_boxed_slice<R: AsRef<[usize]>>(shape: R, data: Box<[T]>) -> Self

Source§

fn into_boxed_slice(self) -> Box<[T]>

Source§

fn dim(&self) -> usize

Source§

fn shape(&self) -> &[usize]

Source§

fn strides(&self) -> &[usize]

Source§

fn size(&self) -> usize

Source§

fn rds_type(&self) -> RDSType

Source§

fn get_raw_array(&self) -> &[T]

Source§

fn get_raw_array_mut(&mut self) -> &mut [T]

Source§

fn insert<W: Tensor<T>>(&mut self, dim: usize, pos: usize, tensor: &W)

Source§

fn extract<R: AsRef<[Range<usize>]>>(&self, bounds: R) -> Self

Source§

fn remove<R: AsRef<[Range<usize>]>>(&mut self, bounds: R)

Source§

fn assign<R: AsRef<[Range<usize>]>, W: Tensor<T>>( &mut self, bounds: R, tensor: &W, )

Source§

fn transpose(&mut self)

Source§

fn zeros<R: AsRef<[usize]>>(shape: R) -> Self

Source§

fn ones<R: AsRef<[usize]>>(shape: R) -> Self

Source§

fn effective_dim(&self) -> usize

Source§

fn reshape_into_vector<R: AsRef<[usize]>>(self, shape: R) -> Vector<T>

Source§

fn reshape_into_matrix<R: AsRef<[usize]>>(self, shape: R) -> Matrix<T>

Source§

fn reshape_into_tensor<R: AsRef<[usize]>>(self, shape: R) -> TensorN<T>

Source§

fn right_split(&mut self, dim: usize, pos: usize) -> Self

Source§

fn left_split(&mut self, dim: usize, pos: usize) -> Self

Auto Trait Implementations§

§

impl<T> Freeze for Matrix<T>

§

impl<T> RefUnwindSafe for Matrix<T>
where T: RefUnwindSafe,

§

impl<T> Send for Matrix<T>
where T: Send,

§

impl<T> Sync for Matrix<T>
where T: Sync,

§

impl<T> Unpin for Matrix<T>
where T: Unpin,

§

impl<T> UnwindSafe for Matrix<T>
where T: UnwindSafe,

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.