X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=mothur.h;h=32f4778a7c1ee19db25eeb4e1eafaf74fabcd617;hp=dcdd76b21a883ca7a65b2780e9e395212464f925;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=ad4f75fd7c938090d3b1ce4cfefcc21edf1869eb diff --git a/mothur.h b/mothur.h index dcdd76b..32f4778 100644 --- a/mothur.h +++ b/mothur.h @@ -173,6 +173,15 @@ struct seqPriorityNode { seqPriorityNode(int n, string s, string nm) : numIdentical(n), seq(s), name(nm) {} ~seqPriorityNode() {} }; +/************************************************************/ +struct compGroup { + string group1; + string group2; + compGroup() {} + compGroup(string s, string nm) : group1(s), group2(nm) {} + string getCombo() { return group1+"-"+group2; } + ~compGroup() {} +}; /***************************************************************/ struct spearmanRank { string name; @@ -209,7 +218,15 @@ inline bool compareDistLinePairs(distlinePair left, distlinePair right){ //sorts lowest to highest inline bool compareSequenceDistance(seqDist left, seqDist right){ return (left.dist < right.dist); -} +} +//******************************************************************************************************************** +//returns sign of double +inline double sign(double temp){ + //find sign + if (temp > 0) { return 1.0; } + else if (temp < 0) { return -1.0; } + return 0; +} /***********************************************************************/ // snagged from http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.2