Trait peroxide::traits::fp::FPMatrix

source ·
pub trait FPMatrix {
    type Scalar;

Show 13 methods // Required methods fn take_row(&self, n: usize) -> Self; fn take_col(&self, n: usize) -> Self; fn skip_row(&self, n: usize) -> Self; fn skip_col(&self, n: usize) -> Self; fn fmap<F>(&self, f: F) -> Self where F: Fn(Self::Scalar) -> Self::Scalar; fn col_map<F>(&self, f: F) -> Self where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>; fn row_map<F>(&self, f: F) -> Self where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>; fn col_mut_map<F>(&mut self, f: F) where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>; fn row_mut_map<F>(&mut self, f: F) where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>; fn reduce<F, T>(&self, init: T, f: F) -> Self::Scalar where F: Fn(Self::Scalar, Self::Scalar) -> Self::Scalar, T: Into<Self::Scalar>; fn zip_with<F>(&self, f: F, other: &Self) -> Self where F: Fn(Self::Scalar, Self::Scalar) -> Self::Scalar; fn col_reduce<F>(&self, f: F) -> Vec<Self::Scalar> where F: Fn(Vec<Self::Scalar>) -> Self::Scalar; fn row_reduce<F>(&self, f: F) -> Vec<Self::Scalar> where F: Fn(Vec<Self::Scalar>) -> Self::Scalar;
}
Expand description

Functional Programming for Matrix and ComplexMatrix

Required Associated Types§

Required Methods§

source

fn take_row(&self, n: usize) -> Self

source

fn take_col(&self, n: usize) -> Self

source

fn skip_row(&self, n: usize) -> Self

source

fn skip_col(&self, n: usize) -> Self

source

fn fmap<F>(&self, f: F) -> Self
where F: Fn(Self::Scalar) -> Self::Scalar,

source

fn col_map<F>(&self, f: F) -> Self
where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>,

source

fn row_map<F>(&self, f: F) -> Self
where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>,

source

fn col_mut_map<F>(&mut self, f: F)
where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>,

source

fn row_mut_map<F>(&mut self, f: F)
where F: Fn(Vec<Self::Scalar>) -> Vec<Self::Scalar>,

source

fn reduce<F, T>(&self, init: T, f: F) -> Self::Scalar
where F: Fn(Self::Scalar, Self::Scalar) -> Self::Scalar, T: Into<Self::Scalar>,

source

fn zip_with<F>(&self, f: F, other: &Self) -> Self
where F: Fn(Self::Scalar, Self::Scalar) -> Self::Scalar,

source

fn col_reduce<F>(&self, f: F) -> Vec<Self::Scalar>
where F: Fn(Vec<Self::Scalar>) -> Self::Scalar,

source

fn row_reduce<F>(&self, f: F) -> Vec<Self::Scalar>
where F: Fn(Vec<Self::Scalar>) -> Self::Scalar,

Object Safety§

This trait is not object safe.

Implementors§