X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=kruskalwalliscommand.h;fp=kruskalwalliscommand.h;h=003ea91c37fa29eb5f46825f12f898a6b842ad55;hb=f954b4d65ce86218f9f7262737f36d1e7faf58d6;hp=7e526137bc42daa1928c7e0988e1b52d546dbf2a;hpb=013ef8f1507c29ef442e47eb3538ecdd1ef6ddef;p=mothur.git diff --git a/kruskalwalliscommand.h b/kruskalwalliscommand.h index 7e52613..003ea91 100644 --- a/kruskalwalliscommand.h +++ b/kruskalwalliscommand.h @@ -10,10 +10,16 @@ #include "command.hpp" -class KruskalWallisCommand : public Command { + struct groupRank { + sstring group; + double value; + double rank; + }; +class KruskalWallisCommand : public Command { + public: - + KruskalWallisCommand(string); KruskalWallisCommand(); ~KruskalWallisCommand(){} @@ -28,7 +34,7 @@ public: int execute(); void help() { m->mothurOut(getHelpString()); } - multimap getRank(vector); + void assignRank(vector); private: string outputDir; @@ -36,6 +42,14 @@ private: vector rankSums; vector rankMeans; + + + bool comparevalue(const groupRank &a, const groupRank &b) { return a.value < b.value; } + bool equalvalue(const groupRank &a, const groupRank &b) { return a.value == b.value; } + bool comparerank(const groupRank &a, const groupRank &b) { return a.rank < b.rank; } + bool equalrank(const groupRank &a, const groupRank &b) { return a.rank == b.rank; } + bool equalgroup(const groupRank &a, const groupRank &b) { return a.group == b.group; } + }; #endif /* KRUSKALWALLISCOMMAND_H */