Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
code for maximal 2-independent set More...
Functions | |
Vector< float > | mis2 (Matrix< float > &undir_A) |
bool | test_mis2 (int n, double sp_frac) |
char * | getCmdOption (char **begin, char **end, const std::string &option) |
int | main (int argc, char **argv) |
code for maximal 2-independent set
char* getCmdOption | ( | char ** | begin, |
char ** | end, | ||
const std::string & | option | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 152 of file mis2.cxx.
References getCmdOption(), ctf.core::np(), ctf.core::rank(), and test_mis2().
compute a maximal 2-independent set of a graph with a given adjacency matrix (any pair of vertices in a 2-MIS should be at leasdt 3 edges apart
[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 16 of file mis2.cxx.
References ctf.core::a, ctf.core::b, CTF::Pair< dtype >::d, CTF::Tensor< dtype >::get_local_pairs(), CTF::Pair< dtype >::k, CTF_int::tensor::nnz_tot, CTF::Matrix< dtype >::nrow, NS, CTF::World::rank, SH, SP, CTF::Tensor< dtype >::sparsify(), CTF::Matrix< dtype >::symm, ctf.core::w, CTF::Tensor< dtype >::write(), and CTF_int::tensor::wrld.
Referenced by test_mis2().
bool test_mis2 | ( | int | n, |
double | sp_frac | ||
) |
Definition at line 99 of file mis2.cxx.
References ctf.core::a, CTF::Tensor< dtype >::fill_sp_random(), CTF::Scalar< dtype >::get_val(), mis2(), CTF_int::tensor::nnz_tot, CTF::World::rank, ctf.core::scl(), SH, SP, and CTF_int::tensor::wrld.
Referenced by main().