Trait peroxide::traits::fp::FPMatrix

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

Functional Programming for Matrix

Required Methods§

source

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

source

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

source

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

source

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

source

fn fmap<F>(&self, f: F) -> Matrix
where F: Fn(f64) -> f64,

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Object Safety§

This trait is not object safe.

Implementors§