X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=hcluster.h;h=d8598867a7bf247509a7736203a5ef505ce70f9e;hp=065d559d1223865313b95a32f20dd6fb14fc5fc0;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=b5a791c81d432082bf38755a08b33863f255341d diff --git a/hcluster.h b/hcluster.h index 065d559..d859886 100644 --- a/hcluster.h +++ b/hcluster.h @@ -21,12 +21,12 @@ class ListVector; class HCluster { public: - HCluster(RAbundVector*, ListVector*, string); + HCluster(RAbundVector*, ListVector*, string, string, NameAssignment*, float); ~HCluster(){}; - void update(int, int, float); + double update(int, int, float); void setMapWanted(bool m); map getSeqtoBin() { return seq2Bin; } - vector getSeqs(ifstream&, NameAssignment*, float); + vector getSeqs(); protected: void clusterBins(); @@ -36,24 +36,40 @@ protected: void printInfo(); void updateArrayandLinkTable(); void updateMap(); + vector getSeqsFNNN(); + vector getSeqsAN(); + int combineFile(); + int processFile(); + //seqDist getNextDist(char*, int&, int); RAbundVector* rabund; ListVector* list; + NameAssignment* nameMap; vector clusterArray; + + //note: the nearest and average neighbor method do not use the link table or active links vector< map > linkTable; // vector of maps - linkTable[1][6] = 2 would mean sequence in spot 1 has 2 links with sequence in 6 map activeLinks; //maps sequence to index in linkTable map::iterator it; + map::iterator itActive; + map::iterator it2Active; map::iterator it2; int numSeqs; int smallRow; int smallCol; - float smallDist; + float smallDist, cutoff; map seq2Bin; bool mapWanted, exitedBreak; seqDist next; - string method; + string method, distfile; + ifstream filehandle; + + vector mergedMin; + string partialDist; + MothurOut* m; + };