]> git.donarmstrong.com Git - mothur.git/blobdiff - suffixtree.cpp
fixed some bugs
[mothur.git] / suffixtree.cpp
index 492460d4dd68f4f025504b58acbc80fad09b09b7..0dbe2c0e41e6bd68df024f411c0883bdd306fe8b 100644 (file)
@@ -41,16 +41,17 @@ SuffixTree::SuffixTree(){}
 
 SuffixTree::~SuffixTree(){
        for(int i=0;i<nodeVector.size();i++){   delete nodeVector[i];   }       
+       nodeVector.clear();
 }
 
 //********************************************************************************************************************
 
-void SuffixTree::loadSequence(Sequence* seq){
+void SuffixTree::loadSequence(Sequence seq){
        nodeCounter = 0;                                                        //      initially there are 0 nodes in the tree
        activeStartPosition = 0;
        activeEndPosition = -1;                                         
-       seqName = seq->getName();
-       sequence = seq->convert2ints();
+       seqName = seq.getName();
+       sequence = seq.convert2ints();
        sequence += '5';                                                        //      this essentially concatenates a '$' to the end of the sequence to
        int seqLength = sequence.length();                      //      make it a cononical suffix tree