X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=linearalgebra.h;h=ef9e03cde900b4e01bdd61a99083801c0d25b913;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=332101853e97ee2ff630f6792dc926c4aa9f4da4;hpb=943d3038553f82378567d3b651969146716e5862;p=mothur.git diff --git a/linearalgebra.h b/linearalgebra.h index 3321018..ef9e03c 100644 --- a/linearalgebra.h +++ b/linearalgebra.h @@ -25,14 +25,47 @@ public: int qtli(vector&, vector&, vector >&); vector< vector > calculateEuclidianDistance(vector >&, int); //pass in axes and number of dimensions vector< vector > calculateEuclidianDistance(vector >&); //pass in axes + vector > getObservedEuclideanDistance(vector >&); double calcPearson(vector >&, vector >&); double calcSpearman(vector >&, vector >&); double calcKendall(vector >&, vector >&); + double calcPearson(vector&, vector&, double&); + double calcSpearman(vector&, vector&, double&); + double calcKendall(vector&, vector&, double&); + + double calcSpearmanSig(double, double, double, double); //length, f^3 - f where f is the number of ties in x, f^3 - f where f is the number of ties in y, sum of squared diffs in ranks. - designed to find the sif of one score. + double calcPearsonSig(double, double); //length, coeff. + double calcKendallSig(double, double); //length, coeff. + + vector solveEquations(vector >, vector); + vector > getInverse(vector >); + + private: MothurOut* m; double pythag(double, double); + double betacf(const double, const double, const double); + double betai(const double, const double, const double); + double gammln(const double); + double gammp(const double, const double); + double gammq(const double, const double); + double gser(double&, const double, const double, double&); + double gcf(double&, const double, const double, double&); + double erfcc(double); + + double ran0(int&); //for testing + double ran1(int&); //for testing + double ran2(int&); //for testing + double ran3(int&); //for testing + double ran4(int&); //for testing + void psdes(unsigned long &, unsigned long &); //for testing + + void ludcmp(vector >&, vector&, double&); + void lubksb(vector >&, vector&, vector&); + + }; #endif