diff options
| author | Alexander <alexanderkabua@gmail.com> | 2022-05-18 14:15:12 +0300 |
|---|---|---|
| committer | Alexander <alexanderkabua@gmail.com> | 2022-05-18 14:15:12 +0300 |
| commit | e1b9f68ff7c16a9411add9beabcdbfa545d1679b (patch) | |
| tree | bdba82fbc1ee9336a67d8c345aa558c4f249d0dd /src/main.rs | |
| parent | 2d5f9f3b8b90c47abfdc3f7c2ddd9c04bfb37616 (diff) | |
| download | correlation_rust-e1b9f68ff7c16a9411add9beabcdbfa545d1679b.tar.gz | |
add main file
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..781ee2b --- /dev/null +++ b/src/main.rs @@ -0,0 +1,34 @@ +use std::env; +use correlation_rust::parser; +use correlation_rust::correlations; +fn main () { + + + let json_file = match env::args().nth(1){ + Some(tmp_file) => { + let results = parser::JsonData::new(&tmp_file); + + + let parsed_x_vals:Vec<f64> = results.x_vals.split(",").map(|f|f.trim().parse::<f64>().unwrap()).collect(); + + + + let computation = correlations::Compute::new( + ',', + "pearson", + &results.file_path, + &parsed_x_vals + + ).compute(); + + //println!("{:?}",computation); + + } + None => panic!("expected an arugment for the json file") + }; + + + + + +} \ No newline at end of file |
