- for(MatData currentCell = matrix->begin(); currentCell != matrix->end(); currentCell++){
- //similairity = -(distance-1)
- simMatrix[currentCell->row][currentCell->column] = -(currentCell->dist -1.0);
- simMatrix[currentCell->column][currentCell->row] = -(currentCell->dist -1.0);
-
- if (m->control_pressed) { return simMatrix; }
+ for (int i = 0; i < matrix->seqVec.size(); i++) {
+ for (int j = 0; j < matrix->seqVec[i].size(); j++) {
+
+ //already checked everyone else in row
+ if (i < matrix->seqVec[i][j].index) {
+ simMatrix[i][matrix->seqVec[i][j].index] = -(matrix->seqVec[i][j].dist -1.0);
+ simMatrix[matrix->seqVec[i][j].index][i] = -(matrix->seqVec[i][j].dist -1.0);