- /************************************************************/
- //fill the minsForRows vectors for each group the user wants
- /************************************************************/
- int lowBoundx = bounds[0]; //where first group starts
- int lowBoundy = bounds[0];
- int highBoundx = bounds[1]; //where second group starts
- int highBoundy = bounds[1];
-
- int countx = 1; //index in bound
- int county = 1; //index in bound
-
- //go through each "box" in the matrix
- for (int i = 0; i < (numGroups * numGroups); i++) {
- //each row in the box
- for (int x = lowBoundx; x < highBoundx; x++) {
- float min4Row = 100000.0;
- //each entry in that row
- for (int y = lowBoundy; y < highBoundy; y++) {
- //if you are not on the diagonal and you are less than previous minimum
- if ((x != y) && (matrix[x][y] < min4Row)){
- min4Row = matrix[x][y];
- }
- }
- //save minimum value
- dist[min4Row] = min4Row;
- }
-
- //****** reset bounds to process next "box" ********
- //if you still have more "boxes" in that row
- if (county < numGroups) {
- county++;
- highBoundy = bounds[county];
- lowBoundy = bounds[county-1];
- }else{ //you are moving to a new row of "boxes"
- county = 1;
- countx++;
- highBoundx = bounds[countx];
- lowBoundx = bounds[countx-1];
- highBoundy = bounds[county];
- lowBoundy = bounds[county-1];
+void FullMatrix::printMatrix(ostream& out) {
+ try{
+ for (int i = 0; i < numSeqs; i++) {
+ out << "row " << i << " group = " << index[i].groupName << " name = " << index[i].seqName << endl;
+ for (int j = 0; j < numSeqs; j++) {
+ out << i << '\t' << j << '\t' << matrix[i][j] << endl;