diff --git a/src/DcSbm.cpp b/src/DcSbm.cpp index e385354..a024635 100644 --- a/src/DcSbm.cpp +++ b/src/DcSbm.cpp @@ -206,10 +206,8 @@ double DcSbm::delta_merge_correction(int k,int l,int obk,int obl,const List & ol arma::vec old_counts =as(old_stats["counts"]); arma::mat old_x_counts =as(old_stats["x_counts"]); cc = counts(k)*counts(l); - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({ obk, obl}); if(l>=obk){ lo=l+1; }else{ diff --git a/src/DcSbmUndirected.cpp b/src/DcSbmUndirected.cpp index 97ea469..5d63b06 100644 --- a/src/DcSbmUndirected.cpp +++ b/src/DcSbmUndirected.cpp @@ -87,10 +87,8 @@ double DcSbmUndirected::delta_merge_correction(int k,int l,int obk,int obl,const arma::vec old_counts =as(old_stats["counts"]); arma::mat old_x_counts =as(old_stats["x_counts"]); cc = counts(k)*counts(l); - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({obk, obl}); if(l>=obk){ lo=l+1; }else{ diff --git a/src/MultSbm.cpp b/src/MultSbm.cpp index adb9c79..52de52a 100644 --- a/src/MultSbm.cpp +++ b/src/MultSbm.cpp @@ -194,10 +194,8 @@ double MultSbm::delta_merge_correction(int k,int l,int obk,int obl,const List & arma::cube old_x_counts =as(old_stats["x_counts"]); arma::vec klcounts; - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({obk, obl}); if(l>=obk){ lo=l+1; }else{ diff --git a/src/MultSbmUndirected.cpp b/src/MultSbmUndirected.cpp index 56ecdb9..4fd48ba 100644 --- a/src/MultSbmUndirected.cpp +++ b/src/MultSbmUndirected.cpp @@ -73,10 +73,8 @@ double MultSbmUndirected::delta_merge_correction(int k,int l,int obk,int obl,con double oxc,xc; arma::cube old_x_counts =as(old_stats["x_counts"]); arma::vec klcounts; - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({obk, obl}); if(l>=obk){ lo=l+1; }else{ @@ -130,4 +128,4 @@ double MultSbmUndirected::delta_merge_correction(int k,int l,int obk,int obl,con } return icl_cor; -} \ No newline at end of file +} diff --git a/src/Sbm.cpp b/src/Sbm.cpp index 8aaddb4..d16e0fb 100644 --- a/src/Sbm.cpp +++ b/src/Sbm.cpp @@ -149,10 +149,8 @@ double Sbm::delta_merge_correction(int k,int l,int obk,int obl,const List & old_ arma::vec old_counts =as(old_stats["counts"]); arma::mat old_x_counts =as(old_stats["x_counts"]); cc = counts(k)*counts(l); - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({obk, obl}); if(l>=obk){ lo=l+1; }else{ diff --git a/src/SbmUndirected.cpp b/src/SbmUndirected.cpp index 7afbe6e..df4fc2f 100644 --- a/src/SbmUndirected.cpp +++ b/src/SbmUndirected.cpp @@ -59,10 +59,8 @@ double SbmUndirected::delta_merge_correction(int k,int l,int obk,int obl,const L arma::vec old_counts =as(old_stats["counts"]); arma::mat old_x_counts =as(old_stats["x_counts"]); cc = counts(k)*counts(l); - arma::uvec kl; - kl << k << l << arma::endr; - arma::uvec mkl; - mkl << obk << obl << arma::endr; + arma::uvec kl({k, l}); + arma::uvec mkl({obk, obl}); if(l>=obk){ lo=l+1; }else{ @@ -117,4 +115,4 @@ double SbmUndirected::delta_merge_correction(int k,int l,int obk,int obl,const L return icl_cor; -} \ No newline at end of file +}