bidradar 0.1.0

Auction bid radar and market analyzer for real-time bidding analysis
1
2
3
4
5
6
7
8
9
10
11
12
13
pub struct SVD;
impl SVD {
    pub fn new() -> Self { SVD }
    pub fn decompose(&self, a: &[Vec<f64>]) -> Result<SVDResult, String> {
        let m = a.len();
        let n = if m > 0 { a[0].len() } else { 0 };
        let s = vec![1.0; n.min(m)];
        let u = a.to_vec();
        let v = vec![vec![0.0; n]; n];
        Ok(SVDResult { s, u, v })
    }
}
pub struct SVDResult { pub s: Vec<f64>, pub u: Vec<Vec<f64>>, pub v: Vec<Vec<f64>> }