Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
code for maximal independent set More...
Functions | |
Vector< float > | mis (Matrix< float > &undir_A) |
bool | test_mis (int n, double sp_frac) |
char * | getCmdOption (char **begin, char **end, const std::string &option) |
int | main (int argc, char **argv) |
code for maximal independent set
char* getCmdOption | ( | char ** | begin, |
char ** | end, | ||
const std::string & | option | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 121 of file mis.cxx.
References getCmdOption(), ctf.core::np(), ctf.core::rank(), and test_mis().
compute a maximal independent set of a graph with a given adjacency matrix
[in] | undir_A | adjacency matrix of undirected graph (symmetric, sparse with values A_{ij}=1.0 if (i,j) is in graph) |
Definition at line 15 of file mis.cxx.
References CTF_int::tensor::nnz_tot, CTF::Matrix< dtype >::nrow, NS, SH, SP, CTF::Tensor< dtype >::sparsify(), and CTF::Matrix< dtype >::symm.
Referenced by test_mis().
bool test_mis | ( | int | n, |
double | sp_frac | ||
) |
Definition at line 68 of file mis.cxx.
References ctf.core::a, CTF::Tensor< dtype >::fill_sp_random(), CTF::Scalar< dtype >::get_val(), mis(), CTF_int::tensor::nnz_tot, CTF::World::rank, ctf.core::scl(), SH, SP, and CTF_int::tensor::wrld.
Referenced by main().