X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=alignment.cpp;h=235216e8e59c82be596004559445c021312acb40;hb=4c302368ef34f0d897afefc7853edf86fb45b9f3;hp=25b27604533cbefa4ba1748001a45622e9712547;hpb=3abb236c602eb168ee112f080b563ebe2c705029;p=mothur.git diff --git a/alignment.cpp b/alignment.cpp index 25b2760..235216e 100644 --- a/alignment.cpp +++ b/alignment.cpp @@ -21,17 +21,34 @@ Alignment::Alignment() { /* do nothing */ } Alignment::Alignment(int A) : nCols(A), nRows(A) { try { + + m = MothurOut::getInstance(); alignment.resize(nRows); // For the Gotoh and Needleman-Wunsch we initialize the dynamic programming for(int i=0;ierrorOut(e, "Alignment", "Alignment"); exit(1); } } +/**************************************************************************************************/ +void Alignment::resize(int A) { + try { + nCols = A; + nRows = A; + alignment.resize(nRows); + for(int i=0;ierrorOut(e, "Alignment", "resize"); + exit(1); + } +} /**************************************************************************************************/ void Alignment::traceBack(){ // This traceback routine is used by the dynamic programming algorithms @@ -92,7 +109,7 @@ void Alignment::traceBack(){ // This traceback routine is used by the dynamic seqBend = seqB.length() - seqBend - 1; } catch(exception& e) { - errorOut(e, "Alignment", "traceBack"); + m->errorOut(e, "Alignment", "traceBack"); exit(1); } } @@ -105,7 +122,7 @@ Alignment::~Alignment(){ } } catch(exception& e) { - errorOut(e, "Alignment", "~Alignment"); + m->errorOut(e, "Alignment", "~Alignment"); exit(1); } }