14 #ifndef ZOLTAN2_GREEDYMWM_HPP__
15 #define ZOLTAN2_GREEDYMWM_HPP__
33 template <
typename vtx_t,
typename wgt_t>
40 template <
typename vtx_t,
typename wgt_t>
48 template <
typename vtx_t,
typename wgt_t>
60 std::vector<triplet_t> edges(idx[tnVtx]);
64 for (
int i=0; i<tnVtx; i++){
65 for (
int jj=idx[i]; jj<idx[i+1]; jj++){
70 edges[k].val = wgt[k];
77 std::sort (edges.begin(), edges.end(), compare_triplets<vtx_t,wgt_t>);
81 for (
typename std::vector<triplet_t>::iterator it=edges.begin();
82 it!=edges.end(); ++it){
87 if ((match[it->i] == it->i) && (match[it->j] == it->j )){
vtx_t GreedyMWM(int *idx, vtx_t *adj, wgt_t *wgt, vtx_t tnVtx, vtx_t *match)
static bool compare_triplets(GMWM_triplet< vtx_t, wgt_t > a, GMWM_triplet< vtx_t, wgt_t > b)