/* * 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 10057 2011-06-02 13:44:44Z karypis $ * */ #include /************************************************************************* * This function finds a matching using the HEM heuristic **************************************************************************/ void CSR_Match_SHEM(matrix_t *matrix, idx_t *match, idx_t *mlist, idx_t *skip, idx_t ncon) { idx_t h, i, ii, j; idx_t nrows, edge, maxidx, count; real_t maxwgt; idx_t *rowptr, *colind; real_t *transfer; rkv_t *links; nrows = matrix->nrows; rowptr = matrix->rowptr; colind = matrix->colind; transfer = matrix->transfer; iset(nrows, UNMATCHED, match); links = rkvmalloc(nrows, "links"); for (i=0; i