about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs35
-rw-r--r--src/main.rs~3
2 files changed, 38 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..1832f9b
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,35 @@
+use rgsl::{
+    randist::t_distribution::{tdist_P, tdist_Q},
+    statistics::{correlation, spearman},
+};
+
+
+trait Correlation {
+    fn correlate(&self,x:&[f64],y:&[f64]) ->(f64,f64);
+}
+
+struct Pearson {
+    n: usize,
+    degree_of_freedom:f64,
+}
+
+impl Pearson {
+    fn new(n:usize) -> Self {
+
+        Self {
+            n,
+            degree_of_freedom:(n - 2) as f64,
+        }
+    }
+}
+
+
+impl Correlation for Pearson {
+    fn correlate(&self,x:&[f64],y:&[f64]) ->(f64,f64){
+        (1.2,0.1)
+    }
+}
+
+fn main() {
+
+}
diff --git a/src/main.rs~ b/src/main.rs~
new file mode 100644
index 0000000..e7a11a9
--- /dev/null
+++ b/src/main.rs~
@@ -0,0 +1,3 @@
+fn main() {
+    println!("Hello, world!");
+}