00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <stdlib.h>
00022 #include <stdio.h>
00023 #include <math.h>
00024 #include "precomp.h"
00025
00026 int main(int argc, char ** argv) {
00027 int m, t, r, min, tmin, tmax, n;
00028 precomp_t p;
00029 double * res, x, y, max;
00030
00031 m = atoi(argv[1]);
00032 if (argc > 2)
00033 tmin = tmax = atoi(argv[2]);
00034 else {
00035 tmin = 1;
00036 tmax = (1 << m) / m;
00037 }
00038
00039 for (t = tmin; t <= tmax; ++t) {
00040 if (argc > 3) {
00041 min = max = atoi(argv[3]);
00042 }
00043 else {
00044 min = 0;
00045 max = m - log2(t);
00046 }
00047 x = log_binomial_d(1 << m, t);
00048 for (r = min; r <= max; ++r) {
00049 p = precomp_build(m, t, r);
00050 res = dicho_self_info_bounds(p);
00051 printf("%d\t%d\t%d\t%d\t%g\t%g\t%g\n", m, t, r, (int) floor(res[0]), res[0], res[1], x);
00052 #ifdef FULL
00053 if (floor(res[0]) != floor(res[1])) {
00054 y = dicho_searchmin(p, floor(res[0]) + 1);
00055 printf("\t\t\t%d\t%g\n", (int) floor(y), y);
00056 }
00057 #endif
00058 free(res);
00059 clear_precomp(p);
00060 }
00061 }
00062
00063 return 0;
00064 }
00065
00066
00067
00068
00069