6 /***********************************************************************/
8 SingleLinkage::SingleLinkage(RAbundVector* rav, ListVector* lv, SparseMatrix* dm) :
12 /***********************************************************************/
13 //This function clusters based on nearest method.
14 void SingleLinkage::update(){
18 for(int i=1;i<nRowCells;i++){
22 if(rowCells[i]->row == smallRow){
23 search = rowCells[i]->column;
26 search = rowCells[i]->row;
29 for(int j=1;j<nColCells;j++){
31 if(colCells[j]->row == search || colCells[j]->column == search){
33 if(colCells[j]->dist > rowCells[i]->dist){
34 colCells[j]->dist = rowCells[i]->dist;
36 if(colCells[j]->vectorMap != NULL){
37 *(colCells[j]->vectorMap) = NULL;
38 colCells[j]->vectorMap = NULL;
42 dMatrix->rmCell(rowCells[i]);
47 if(search < smallCol){
48 rowCells[i]->row = smallCol;
49 rowCells[i]->column = search;
52 rowCells[i]->row = search;
53 rowCells[i]->column = smallCol;
59 dMatrix->rmCell(rowCells[0]);
62 cout << "Standard Error: " << e.what() << " has occurred in the SingleLinkage class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
66 cout << "An unknown error has occurred in the SingleLinkage class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
71 /***********************************************************************/