#include <windows.h>
#include <psapi.h>
#include <direct.h>
+ #include <tchar.h>
+
#endif
using namespace std;
#define isnan(x) ((x) != (x))
#define isinf(x) (fabs(x) == std::numeric_limits<double>::infinity())
+
typedef unsigned long ull;
struct IntNode {
IntNode* right;
};
+struct diffPair {
+ float prob;
+ float reverseProb;
+
+ diffPair() {
+ prob = 0; reverseProb = 0;
+ }
+ diffPair(float p, float rp) {
+ prob = p;
+ reverseProb = rp;
+ }
+};
+
/************************************************************/
struct clusterNode {
int numSeq;
int end;
};
+/************************************************************/
+struct seqPriorityNode {
+ int numIdentical;
+ string seq;
+ string name;
+ seqPriorityNode() {}
+ seqPriorityNode(int n, string s, string nm) : numIdentical(n), seq(s), name(nm) {}
+ ~seqPriorityNode() {}
+};
/***************************************************************/
struct spearmanRank {
string name;
return (left.score > right.score);
}
//********************************************************************************************************************
+//sorts highest to lowest
+inline bool compareSeqPriorityNodes(seqPriorityNode left, seqPriorityNode right){
+ return (left.numIdentical > right.numIdentical);
+}
+//********************************************************************************************************************
//sorts lowest to highest
inline bool compareSpearmanReverse(spearmanRank left, spearmanRank right){
return (left.score < right.score);
throw BadConversion(s);
}
-
+//**********************************************************************************************************************
+template <typename T> int sgn(T val){ return (val > T(0)) - (val < T(0)); }
//**********************************************************************************************************************
template<typename T>