+}
+
+/**************************************************************************/
+void FullMatrix::swapRows(int i, int j) {
+ try {
+
+ float y;
+ string z, name;
+
+ /* swap rows*/
+ for (int h = 0; h < numSeqs; h++) {
+ y = matrix[i][h];
+ matrix[i][h] = matrix[j][h];
+ matrix[j][h] = y;
+ }
+
+ /* swap columns*/
+ for (int b = 0; b < numSeqs; b++) {
+ y = matrix[b][i];
+ matrix[b][i] = matrix[b][j];
+ matrix[b][j] = y;
+ }
+
+ //swap map elements
+ z = index[i].groupName;
+ index[i].groupName = index[j].groupName;
+ index[j].groupName = z;
+
+ name = index[i].seqName;
+ index[i].seqName = index[j].seqName;
+ index[j].seqName = name;
+
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "FullMatrix", "swapRows");