Function peroxide::structure::matrix::gemv

source ·
pub fn gemv(alpha: f64, a: &Matrix, b: &Vec<f64>, beta: f64, c: &mut Vec<f64>)
Expand description

General Matrix-Vector multiplication

§Example

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("1 2 3; 4 5 6");
    let b = c!(1, 2, 3);
    let mut c = vec![0f64; 2];
    gemv(1f64, &a, &b, 0f64, &mut c);
    assert_eq!(c, c!(14, 32));
}