comparison Meerwald/cmp_koch_sig.c @ 18:3bdb67e76858

mse opt.
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 30 Jan 2009 12:46:49 +0100
parents f83ef905a63d
children
comparison
equal deleted inserted replaced
17:824d192e5614 18:3bdb67e76858
130 if (get_signature1_bit(i % nbit_signature1) == get_signature2_bit(i)) 130 if (get_signature1_bit(i % nbit_signature1) == get_signature2_bit(i))
131 corr++, match++; 131 corr++, match++;
132 else 132 else
133 corr--; 133 corr--;
134 134
135 if (verbose > 1) {
136 for (i = 0; i < nbit_signature2; i++)
137 fprintf(stderr, "%d", get_signature1_bit(i % nbit_signature1));
138 fprintf(stderr, "\n");
139 for (i = 0; i < nbit_signature2; i++)
140 fprintf(stderr, "%d", get_signature2_bit(i));
141 fprintf(stderr, "\n");
142 }
143
135 if (correlation_only) 144 if (correlation_only)
136 fprintf(out, "%lf\n", (double) corr / nbit_signature2); 145 fprintf(out, "%lf\n", (double) corr / nbit_signature2);
137 else { 146 else {
138 fprintf(out, "bit matches: %d/%d\n", match, nbit_signature2); 147 fprintf(out, "bit matches: %d/%d\n", match, nbit_signature2);
139 fprintf(out, "correlation: %lf\n", (double) corr / nbit_signature2); 148 fprintf(out, "correlation: %lf\n", (double) corr / nbit_signature2);

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.