X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=distancedb.hpp;h=2624d6d6440190520e02af09c43264bf365c9f33;hp=dc4c9a6b46f8ee28b8db5b24b8b0bd083f03d033;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=526a868606faa50caf86e7399f7554c0335b39e5 diff --git a/distancedb.hpp b/distancedb.hpp index dc4c9a6..2624d6d 100644 --- a/distancedb.hpp +++ b/distancedb.hpp @@ -5,32 +5,41 @@ * distancedb.hpp * * - * Created by Pat Schloss on 12/29/08. - * Copyright 2008 Patrick D. Schloss. All rights reserved. + * Created by westcott on 1/27/10. + * Copyright 2010 Schloss Lab. All rights reserved. * */ -using namespace std; - #include "mothur.h" +#include "dist.h" class DistanceDB : public Database { public: - DistanceDB(string, string); - Sequence* findClosestSequence(Sequence*); + + DistanceDB(); + ~DistanceDB() { delete distCalculator; } + + void generateDB() {} //doesn't generate a search db + void addSequence(Sequence); + string getName(int i) { return data[i].getName(); } + vector findClosestSequences(Sequence*, int); // returns indexes of n closest sequences to query + + #ifdef USE_MPI + int MPISend(int) {return 0;} + int MPIRecv(int) {return 0;} + #endif private: - - struct hit{ - string seqName; - int indexNumber; - float simScore; - }; - vector mostSimSequenceVector; -// ifstream inputData; - int searchIndex; + vector data; + Dist* distCalculator; + + int templateSeqsLength; + bool templateAligned; + + bool isAligned(string); + }; #endif