+/***********************************************************************/
+int SparseDistanceMatrix::addCellSorted(ull row, PDistCell cell){
+ try {
+ numNodes+=2;
+ if(cell.dist < smallDist){ smallDist = cell.dist; }
+
+ seqVec[row].push_back(cell);
+ PDistCell temp(row, cell.dist);
+ seqVec[cell.index].push_back(temp);
+
+ sortSeqVec(row);
+ sortSeqVec(cell.index);
+
+ int location = -1; //find location of new cell when sorted
+ for (int i = 0; i < seqVec[row].size(); i++) { if (seqVec[row][i].index == cell.index) { location = i; break; } }
+
+ return location;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SparseDistanceMatrix", "addCellSorted");
+ exit(1);
+ }
+}
+