Commit 479eedef by Alois SCHLOEGL

### avoid storing extra (Bernoulli) matrix - but do the Bernoulli conversion only...

`avoid storing extra (Bernoulli) matrix - but do the Bernoulli conversion only when writing the matrix`
parent fdd2036c
 ... @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { ... @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { for(int i=0; i1.0); } } fprintf(fhnd,"\n"); fprintf(fhnd,"\n"); } } ... ...
 ... @@ -207,30 +207,7 @@ gsl_matrix* secorder_rec_1p(int N_nodes, double p, ... @@ -207,30 +207,7 @@ gsl_matrix* secorder_rec_1p(int N_nodes, double p, } } //////////////////////////////////////////////////////////// return W_gaus; // Step 5: Calculate Bernoulli matrix // Simply make the Bernoulli variable be 1 // if the Gaussian variable is greater than 1 //////////////////////////////////////////////////////////// cout << "Generating Bernoulli matrix..."; cout.flush(); // calculate bernoulli matrix gsl_matrix *W_ber = gsl_matrix_alloc(N_nodes, N_nodes); for(int i=0; i1.0); } } // free Gaussian matrix gsl_matrix_free(W_gaus); cout << "done\n"; cout.flush(); // return Bernoulli matrix return W_ber; } } ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!