compute 0.2.3

A crate for statistical computing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::collections::HashMap;

#[derive(Debug, Clone)]
pub struct Formula<'a, 'b> {
    formula: &'a str,
    data: HashMap<&'b str, Vec<f64>>,
}

impl<'a, 'b> Formula<'a, 'b> {
    pub fn new(formula: &'a str, data: HashMap<&'b str, Vec<f64>>) -> Self {
        Self { formula, data }
    }

    pub fn parse(&self) -> Result<Vec<f64>, &'static str> {
        assert!(self.formula.contains("~"), "Formula must contain ~.");
        todo!()
    }
}