Struct MatrixUpper

Source
pub struct MatrixUpper<T> {
    pub size: usize,
    pub data: Vec<T>,
}

Fields§

§size: usize§data: Vec<T>

Implementations§

Source§

impl<T> MatrixUpper<T>

Source

pub fn empty() -> MatrixUpper<T>

Source

pub unsafe fn from_vec_unchecked(size: usize, new_vec: Vec<T>) -> MatrixUpper<T>

Source

pub fn from_vec(size: usize, new_vec: Vec<T>) -> Option<MatrixUpper<T>>

Source

pub fn to_slice_mut(&mut self) -> &mut [T]

Source

pub fn to_matrixupperslicemut(&mut self) -> MatrixUpperSliceMut<'_, T>

Source

pub fn size(&self) -> [usize; 2]

Source

pub fn get_diagonal_terms(&self) -> Option<Vec<&T>>

Source§

impl<T: Copy + Clone> MatrixUpper<T>

Source

pub fn new(size: usize, new_default: T) -> MatrixUpper<T>

Source

pub fn to_matrixfull(&self) -> Option<MatrixFull<T>>

Source§

impl MatrixUpper<f64>

Source

pub fn formated_output(&self, n_len: usize, mat_form: &str)

Trait Implementations§

Source§

impl<T: Copy + Clone + Display + Send + Sync + Add + AddAssign> Add for MatrixUpper<T>

Source§

type Output = MatrixUpper<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: MatrixUpper<T>) -> MatrixUpper<T>

Performs the + operation. Read more
Source§

impl<T: Clone> Clone for MatrixUpper<T>

Source§

fn clone(&self) -> MatrixUpper<T>

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

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for MatrixUpper<T>

Source§

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

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

impl<T, I: SliceIndex<[T]>> Index<I> for MatrixUpper<T>

Source§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
Source§

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

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

impl<T, I: SliceIndex<[T]>> IndexMut<I> for MatrixUpper<T>

Source§

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

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

impl<T: PartialEq> PartialEq for MatrixUpper<T>

Source§

fn eq(&self, other: &MatrixUpper<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Clone + Display + Send + Sync + Sub + SubAssign> Sub for MatrixUpper<T>

Source§

type Output = MatrixUpper<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: MatrixUpper<T>) -> MatrixUpper<T>

Performs the - operation. Read more
Source§

impl<T> TensorOpt<T> for MatrixUpper<T>

Source§

fn get1d(&self, position: usize) -> Option<&T>

Source§

fn get2d(&self, position: [usize; 2]) -> Option<&T>

Source§

fn get(&self, position: &[usize]) -> Option<&T>

Source§

fn get3d(&self, position: [usize; 3]) -> Option<&T>

Source§

fn get4d(&self, position: [usize; 4]) -> Option<&T>

Source§

impl<'a, T> TensorOptMut<'a, T> for MatrixUpper<T>

Source§

fn get1d_mut(&mut self, position: usize) -> Option<&mut T>

Source§

fn get2d_mut(&mut self, position: [usize; 2]) -> Option<&mut T>

Source§

fn get_mut(&mut self, position: &[usize]) -> Option<&mut T>

Source§

fn set1d(&mut self, position: usize, new_data: T)

Source§

fn set2d(&mut self, position: [usize; 2], new_data: T)

Source§

fn set(&mut self, position: &[usize], new_data: T)

Source§

fn get3d_mut(&mut self, position: [usize; 3]) -> Option<&mut T>

Source§

fn get4d_mut(&mut self, position: [usize; 4]) -> Option<&mut T>

Source§

fn set3d(&mut self, position: [usize; 3], new_data: T)

Source§

fn set4d(&mut self, position: [usize; 4], new_data: T)

Source§

impl<'a, T> TensorOptMutUncheck<'a, T> for MatrixUpper<T>

Source§

fn get2d_mut_uncheck(&mut self, position: [usize; 2]) -> Option<&mut T>

Source§

fn set2d_uncheck(&mut self, position: [usize; 2], new_data: T)

Source§

fn get4d_mut_uncheck(&mut self, position: [usize; 4]) -> Option<&mut T>

Source§

fn set4d_uncheck(&mut self, position: [usize; 4], new_data: T)

Source§

impl<T> TensorOptUncheck<T> for MatrixUpper<T>

Source§

fn get2d_uncheck(&self, position: [usize; 2]) -> Option<&T>

Source§

fn get4d_uncheck(&self, position: [usize; 4]) -> Option<&T>

Source§

impl<T> TensorSlice<T> for MatrixUpper<T>

Source§

fn get1d_slice(&self, position: usize, length: usize) -> Option<&[T]>

Source§

fn get2d_slice(&self, position: [usize; 2], length: usize) -> Option<&[T]>

Source§

fn get_slice(&self, position: &[usize], length: usize) -> Option<&[T]>

Source§

fn get3d_slice(&self, position: [usize; 3], length: usize) -> Option<&[T]>

Source§

fn get4d_slice(&self, position: [usize; 4], length: usize) -> Option<&[T]>

Source§

impl<'a, T> TensorSliceMut<'a, T> for MatrixUpper<T>

Source§

fn get1d_slice_mut( &mut self, position: usize, length: usize, ) -> Option<&mut [T]>

Source§

fn get2d_slice_mut( &mut self, position: [usize; 2], length: usize, ) -> Option<&mut [T]>

Source§

fn get_slice_mut( &mut self, position: &[usize], length: usize, ) -> Option<&mut [T]>

Source§

fn get3d_slice_mut( &mut self, position: [usize; 3], length: usize, ) -> Option<&mut [T]>

Source§

fn get4d_slice_mut( &mut self, position: [usize; 4], length: usize, ) -> Option<&mut [T]>

Source§

impl<'a, T> TensorSliceMutUncheck<'a, T> for MatrixUpper<T>

Source§

fn get2d_slice_mut_uncheck( &mut self, position: [usize; 2], length: usize, ) -> Option<&mut [T]>

Source§

fn get4d_slice_mut_uncheck( &mut self, position: [usize; 4], length: usize, ) -> Option<&mut [T]>

Source§

impl<T> TensorSliceUncheck<T> for MatrixUpper<T>

Source§

fn get2d_slice_uncheck( &self, position: [usize; 2], length: usize, ) -> Option<&[T]>

Source§

fn get4d_slice_uncheck( &self, position: [usize; 4], length: usize, ) -> Option<&[T]>

Source§

impl<T> StructuralPartialEq for MatrixUpper<T>

Auto Trait Implementations§

§

impl<T> Freeze for MatrixUpper<T>

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for MatrixUpper<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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,