Struct hmm::matrices::Vector
[−]
[src]
pub struct Vector { /* fields omitted */ }
Vector is just Rust Vec
Methods
impl Vector
[src]
fn new(v: Vec<f64>) -> Vector
Vector constructor
fn len(&self) -> usize
Vector length
fn get(&self, i: usize) -> f64
Item at given index
fn is_positive(&self) -> bool
Positive matrix has all its entries >= 0
fn add_vector(&self, u: &Vector) -> Vector
Ad 2 vectors. If the have different size, they output vector will have minimal size
fn add_scalar(&self, u: &Vector) -> Vector
Ad scalar to the vector.
fn minus_log(&self) -> Vector
Apply -log2 for each element
fn argmin(&self) -> usize
get index with minimal value
Trait Implementations
impl Debug for Vector
[src]
impl PartialEq for Vector
[src]
fn eq(&self, __arg_0: &Vector) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vector) -> bool
This method tests for !=
.
impl Clone for Vector
[src]
fn clone(&self) -> Vector
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more