Commit d088b6ad authored by Alois SCHLOEGL's avatar Alois SCHLOEGL

fix calc_alpha - conversion to Bernoulli Matrix must change W(i,j) values to 0...

fix calc_alpha - conversion to Bernoulli Matrix must change W(i,j) values to 0 and 1 in memory before estimating the alpha values
parent 8e812664
......@@ -110,9 +110,11 @@ int main(int argc, char *argv[]) {
fwrite(&nr,8,1,fhnd);
fwrite(&nc,8,1,fhnd);
fwrite(&nnz,8,1,fhnd);
for (int32_t i=0; i<N_nodes; i++) {
for (int32_t j=0; j<N_nodes; j++) {
if (gsl_matrix_float_get(W,i,j) > 1.0) {
for (int i=0; i<N_nodes; i++) {
for (int j=0; j<N_nodes; j++) {
int t = gsl_matrix_float_get(W,i,j) > 1.0;
gsl_matrix_float_set(W,i,j,(float)t);
if (t) {
fwrite(&i, 4, 1, fhnd);
fwrite(&j, 4, 1, fhnd);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment