-NeedlemanOverlap::NeedlemanOverlap(float gO, float m, float mm, int r) :// note that we don't have a gap extend
-gap(gO), match(m), mismatch(mm), Alignment(r) { // the gap openning penalty is assessed for
- // every gapped position
- for(int i=1;i<nCols;i++){
- alignment[0][i].prevCell = 'l'; // initialize first row by pointing all poiters to the left
- alignment[0][i].cValue = 0; // and the score to zero
- }
+NeedlemanOverlap::NeedlemanOverlap(float gO, float f, float mm, int r) :// note that we don't have a gap extend
+gap(gO), match(f), mismatch(mm), Alignment(r) { // the gap openning penalty is assessed for
+ try { // every gapped position
+ for(int i=1;i<nCols;i++){
+ alignment[0][i].prevCell = 'l'; // initialize first row by pointing all poiters to the left
+ alignment[0][i].cValue = 0; // and the score to zero
+ }
+
+ for(int i=1;i<nRows;i++){
+ alignment[i][0].prevCell = 'u'; // initialize first column by pointing all poiters upwards
+ alignment[i][0].cValue = 0; // and the score to zero
+ }