Struct hmm::matrices::Matrix
[−]
[src]
pub struct Matrix { /* fields omitted */ }
2 dimensional matrix
Methods
impl Matrix
[src]
fn new(data: Vec<Vec<f64>>) -> Option<Matrix>
Create new matrix
fn cols(&self) -> usize
fn is_positive(&self) -> bool
Positive matrix has all its entries >= 0
fn minus_log(&self) -> Matrix
Apply -log2 for each element
fn column(&self, index: usize) -> Option<Vector>
Get copy of a given column
fn add_to_columns(&self, v: &Vector) -> Matrix
Add vector to each column
fn min_by_column(&self) -> Vector
Maximum by column
fn argmin_by_column(&self) -> Vec<usize>
Argmax by column