/* * Copyright 1997, Regents of the University of Minnesota * * csrmatch.c * * This file contains the code that computes matchings * * Started 7/23/97 * George * * $Id: csrmatch.c,v 1.2 2003/07/21 17:18:48 karypis Exp $ * */ #include /************************************************************************* * This function finds a matching using the HEM heuristic **************************************************************************/ void CSR_Match_SHEM(MatrixType *matrix, idxtype *match, idxtype *mlist, idxtype *skip, int ncon) { int h, i, ii, j; int nrows, edge, maxidx, count; float maxwgt; idxtype *rowptr, *colind; float *transfer; KVType *links; nrows = matrix->nrows; rowptr = matrix->rowptr; colind = matrix->colind; transfer = matrix->transfer; idxset(nrows, UNMATCHED, match); links = (KVType *)GKmalloc(sizeof(KVType)*nrows, "links"); for (i=0; i