Struct DenseMatrixMutView

Source
pub struct DenseMatrixMutView<'a, T: Debug + Display + Copy + Sized> { /* private fields */ }
Expand description

Mutable view on dense matrix

Trait Implementations§

Source§

impl<T: Debug + Display + Copy + Sized> Array<T, (usize, usize)> for DenseMatrixMutView<'_, T>

Source§

fn get(&self, pos: (usize, usize)) -> &T

retrieve a reference to a value at position
Source§

fn shape(&self) -> (usize, usize)

return shape of the array
Source§

fn is_empty(&self) -> bool

return true if array is empty
Source§

fn iterator<'b>(&'b self, axis: u8) -> Box<dyn Iterator<Item = &'b T> + 'b>

iterate over array’s values
Source§

impl<T: Debug + Display + Copy + Sized> ArrayView2<T> for DenseMatrixMutView<'_, T>

Source§

fn max(&self, axis: u8) -> Vec<T>
where T: Number + PartialOrd,

return max value in array
Source§

fn sum(&self, axis: u8) -> Vec<T>
where T: Number,

return sum of element of array
Source§

fn min(&self, axis: u8) -> Vec<T>
where T: Number + PartialOrd,

return min value of array
Source§

fn argmax(&self, axis: u8) -> Vec<usize>
where T: Number + PartialOrd,

return positions of max values in both rows
Source§

fn mean_by(&self, axis: u8) -> Vec<f64>
where T: Number,

return mean value TODO: this can be made more readable and efficient using the methods in linalg::traits::stats
Source§

fn variance(&self, axis: u8) -> Vec<f64>
where T: Number + RealNumber,

return variance
Source§

fn std_dev(&self, axis: u8) -> Vec<f64>
where T: Number + RealNumber,

return standard deviation
Source§

fn cov(&self, cov: &mut dyn MutArrayView2<f64>)
where T: Number,

return covariance
Source§

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

print out array
Source§

fn norm(&self, p: f64) -> f64
where T: Number,

return norm
Source§

fn diag(&self) -> Vec<T>

return array diagonal
Source§

impl<'a, T: Debug + Debug + Display + Copy + Sized> Debug for DenseMatrixMutView<'a, T>

Source§

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

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

impl<T: Debug + Display + Copy + Sized> Display for DenseMatrixMutView<'_, T>

Source§

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

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

impl<T: Debug + Display + Copy + Sized> MutArray<T, (usize, usize)> for DenseMatrixMutView<'_, T>

Source§

fn set(&mut self, pos: (usize, usize), x: T)

assign value to a position
Source§

fn iterator_mut<'b>( &'b mut self, axis: u8, ) -> Box<dyn Iterator<Item = &'b mut T> + 'b>

iterate over mutable values
Source§

fn swap(&mut self, a: S, b: S)
where S: Copy,

swap values between positions
Source§

fn div_element_mut(&mut self, pos: S, x: T)
where T: Number, S: Copy,

divide element by a given value
Source§

fn mul_element_mut(&mut self, pos: S, x: T)
where T: Number, S: Copy,

multiply element for a given value
Source§

fn add_element_mut(&mut self, pos: S, x: T)
where T: Number, S: Copy,

add a given value to an element
Source§

fn sub_element_mut(&mut self, pos: S, x: T)
where T: Number, S: Copy,

subtract a given value to an element
Source§

fn sub_scalar_mut(&mut self, x: T)
where T: Number,

subtract a given value to all the elements
Source§

fn add_scalar_mut(&mut self, x: T)
where T: Number,

add a given value to all the elements
Source§

fn mul_scalar_mut(&mut self, x: T)
where T: Number,

multiply a given value to all the elements
Source§

fn div_scalar_mut(&mut self, x: T)
where T: Number,

divide a given value to all the elements
Source§

fn add_mut(&mut self, other: &dyn Array<T, S>)
where T: Number, S: Eq,

add values from another array to the values of initial array
Source§

fn sub_mut(&mut self, other: &dyn Array<T, S>)
where T: Number, S: Eq,

subtract values from another array to the values of initial array
Source§

fn mul_mut(&mut self, other: &dyn Array<T, S>)
where T: Number, S: Eq,

multiply values from another array to the values of initial array
Source§

fn div_mut(&mut self, other: &dyn Array<T, S>)
where T: Number, S: Eq,

divide values from another array to the values of initial array
Source§

impl<T: Debug + Display + Copy + Sized> MutArrayView2<T> for DenseMatrixMutView<'_, T>

Source§

fn copy_from(&mut self, other: &dyn Array<T, (usize, usize)>)

copy values from another array
Source§

fn abs_mut(&mut self)
where T: Number + Signed,

update view with absolute values
Source§

fn neg_mut(&mut self)
where T: Number + Neg<Output = T>,

update view values with opposite sign
Source§

fn pow_mut(&mut self, p: T)
where T: RealNumber,

update view values at power p
Source§

fn scale_mut(&mut self, mean: &[T], std: &[T], axis: u8)
where T: Number,

scale view values

Auto Trait Implementations§

§

impl<'a, T> Freeze for DenseMatrixMutView<'a, T>

§

impl<'a, T> RefUnwindSafe for DenseMatrixMutView<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for DenseMatrixMutView<'a, T>
where T: Send,

§

impl<'a, T> Sync for DenseMatrixMutView<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for DenseMatrixMutView<'a, T>

§

impl<'a, T> !UnwindSafe for DenseMatrixMutView<'a, T>

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.