src/misc/espresso/sminterf.c File Reference

#include "espresso.h"
Include dependency graph for sminterf.c:

Go to the source code of this file.

Functions

pset do_sm_minimum_cover (pset_family A)

Function Documentation

pset do_sm_minimum_cover ( pset_family  A  ) 

Definition at line 14 of file sminterf.c.

00016 {
00017     sm_matrix *M;
00018     sm_row *sparse_cover;
00019     sm_element *pe;
00020     pset cover;
00021     register int i, base, rownum;
00022     register unsigned val;
00023     register pset last, p;
00024 
00025     M = sm_alloc();
00026     rownum = 0;
00027     foreach_set(A, last, p) {
00028         foreach_set_element(p, i, val, base) {
00029             (void) sm_insert(M, rownum, base);
00030         }
00031         rownum++;
00032     }
00033 
00034     sparse_cover = sm_minimum_cover(M, NIL(int), 1, 0);
00035     sm_free(M);
00036 
00037     cover = set_new(A->sf_size);
00038     sm_foreach_row_element(sparse_cover, pe) {
00039         set_insert(cover, pe->col_num);
00040     }
00041     sm_row_free(sparse_cover);
00042 
00043     return cover;
00044 }


Generated on Tue Jan 5 12:19:12 2010 for abc70930 by  doxygen 1.6.1