X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=linearalgebra.h;h=5819ea85d8deefba15ca1c45ccf03efd21c9321a;hp=58a60dae8f04d9eae12fff9f8d729cc2119d4c92;hb=b25ede2ad307ae76f8a610443e0ec3ec69621ce7;hpb=f0a594f6676ef5a52d1f122b6de70de2fda08c81 diff --git a/linearalgebra.h b/linearalgebra.h index 58a60da..5819ea8 100644 --- a/linearalgebra.h +++ b/linearalgebra.h @@ -29,11 +29,49 @@ public: double calcPearson(vector >&, vector >&); double calcSpearman(vector >&, vector >&); double calcKendall(vector >&, vector >&); - + double calcKruskalWallis(vector&, double&); + double calcWilcoxon(vector&, vector&, double&); + + 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 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 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 gammp(const double, const 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&); + + void ludcmp(vector >&, vector&, float&); + void lubksb(vector >&, vector&, vector&); + + }; #endif