Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
betweenness centrality

betweenness centrality computation More...

Collaboration diagram for betweenness centrality:

Namespaces

 CTF
 

Functions

void btwn_cnt_fast (Matrix< int > A, int b, Vector< double > &v, int nbatches=0, bool sp_B=true, bool sp_C=true)
 fast algorithm for betweenness centrality using Bellman Ford More...
 
void btwn_cnt_naive (Matrix< int > &A, Vector< double > &v)
 naive algorithm for betweenness centrality using 3D tensor of counts More...
 
int btwn_cnt (int n, World &dw, double sp=.20, int bsize=2, int nbatches=1, int test=0, bool sp_B=1, bool sp_C=1)
 
char * getCmdOption (char **begin, char **end, const std::string &option)
 
int main (int argc, char **argv)
 

Detailed Description

betweenness centrality computation

Function Documentation

int btwn_cnt ( int  n,
World dw,
double  sp = .20,
int  bsize = 2,
int  nbatches = 1,
int  test = 0,
bool  sp_B = 1,
bool  sp_C = 1 
)
void btwn_cnt_fast ( Matrix< int >  A,
int  b,
Vector< double > &  v,
int  nbatches = 0,
bool  sp_B = true,
bool  sp_C = true 
)

fast algorithm for betweenness centrality using Bellman Ford

Parameters
[in]Amatrix on the tropical semiring containing edge weights
[in]bnumber of source vertices for which to compute Bellman Ford at a time
[out]vvector that will contain centrality scores for each vertex
[in]nbatchesnumber of batches (sets of nodes of size b) to compute on (0 means all)
[in]sp_Bwhether to store second operand as sparse
[in]sp_Cwhether to store output as sparse

Definition at line 35 of file btwn_central.cxx.

References ctf.core::a, ctf.core::b, cpath::c, get_Bellman_kernel(), get_Brandes_kernel(), get_cpath_monoid(), get_mpath_semiring(), CTF::Scalar< dtype >::get_val(), CTF_int::tensor::nnz_tot, CTF::Matrix< dtype >::nrow, CTF::World::rank, CTF_int::tensor::set_zero(), CTF::Tensor< dtype >::slice(), SP, CTF::Tensor< dtype >::sparsify(), speye(), CTF::Timer::start(), CTF::Timer::stop(), mpath::w, cpath::w, ctf.core::w, and CTF_int::tensor::wrld.

Referenced by btwn_cnt().

void btwn_cnt_naive ( Matrix< int > &  A,
Vector< double > &  v 
)

naive algorithm for betweenness centrality using 3D tensor of counts

Parameters
[in]Amatrix on the tropical semiring containing edge weights
[out]vvector that will contain centrality scores for each vertex

Definition at line 163 of file btwn_central.cxx.

References ctf.core::a, ctf.core::b, get_cpath_monoid(), get_mpath_semiring(), CTF::Matrix< dtype >::nrow, ctf.core::w, and CTF_int::tensor::wrld.

Referenced by btwn_cnt().

char* getCmdOption ( char **  begin,
char **  end,
const std::string &  option 
)

Definition at line 306 of file btwn_central.cxx.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 317 of file btwn_central.cxx.

References btwn_cnt(), getCmdOption(), ctf.core::np(), and ctf.core::rank().