23 June 2005 11:44:01 AM CVT_DATASET (C++ version) Compiled on Jun 23 2005 at 11:43:18. Generate a CVT dataset. This program is meant to be used interactively. It is also possible to prepare a simple input file beforehand and use it in batch mode. The program requests input values from the user: * DIM_NUM, the spatial dimension, * N, the number of points to generate, * SEED, a seed to use for random number generation, * INIT, initialize the points: ** file, read data from a file; ** GRID, by picking points from a grid; ** HALTON, from a Halton sequence; ** RANDOM, using FORTRAN RANDOM function; ** UNIFORM, using a simple uniform RNG; ** USER, call the "USER" routine; * IT_MAX, the maximum number of iterations. * IT_FIXED, the number of iterative steps to take using a fixed set of sampling points. * SAMPLE, how to conduct the sampling. ** GRID, by picking points from a grid; ** HALTON, from a Halton sequence; ** RANDOM, using FORTRAN RANDOM function; ** UNIFORM, using a simple uniform RNG; ** USER, call the "USER" routine; * SAMPLE_NUM, the number of sample points. * BATCH, the number of sample points to generate at one time. * OUTPUT, a file to store the data. To indicate that no further computations are desired, it is enough to input a nonsensical value, such as -1. * * * Ready to generate a new dataset: * * Enter DIM_NUM, the spatial dimension: (Try '2' if you have no preference.) (0 or any negative value terminates execution). User input DIM_NUM = 2 Enter N, the number of points to generate: (Try '25' if you have no preference.) (0 or any negative value terminates execution). User input N = 85 Enter SEED, a seed for the random number generator: (Try '123456789' if you have no preference.) (Any negative value terminates execution). User input SEED = 123456789 INIT is the method of initializing the data: file read data from a file; GRID by picking points from a grid; HALTON from a Halton sequence; RANDOM using C++ RANDOM function; UNIFORM using a simple uniform RNG; USER call the "USER" routine; (Try 'RANDOM' if you have no preference.) (A blank value terminates execution). Enter INIT: User input INIT = "uniform". IT_MAX is the maximum number of iterations. An iteration carries out the following steps: * the Voronoi region associated with each generator is estimated by sampling; * the centroid of each Voronoi region is estimated. * the generator is replaced by the centroid. If "enough" sampling points are used, and "enough" iterations are taken, this process will converge. (Try '50' if you have no preference.) (A negative value terminates execution). Enter IT_MAX: User input IT_MAX = 100 IT_FIXED is the number of consecutive iterations to take with a fixed set of sample points. Setting IT_FIXED to 1 means a new set of sample points is generated on every iterative step; Setting IT_FIXED equal to IT_MAX means a single set of sample points is used for the entire iteration. Any value between 1 and IT_MAX is reasonable. (Try 100 if you have no preference.) (A 0 or negative value terminates execution). Enter IT_FIXED: User input IT_FIXED = 25 SAMPLE is the method of sampling the region: GRID by picking points from a grid; HALTON from a Halton sequence; RANDOM using C++ RANDOM function; UNIFORM using a simple uniform RNG; USER call the "USER" routine; (Try 'RANDOM' if you have no preference.) (A blank value terminates execution). Enter SAMPLE: User input SAMPLE = "uniform". SAMPLE_NUM is the number of sample points. The Voronoi regions will be explored by generating SAMPLE_NUM points. For each sample point, the nearest generator is found. Using more points gives a better estimate of these regions. SAMPLE_NUM should be much larger than N, the number of generators. (Try '10000' if you have no preference.) (A zero or negative value terminates execution.) Enter SAMPLE_NUM: User input SAMPLE_NUM = 100000 BATCH is the number of sample points to create at one time. BATCH should be between 1 and SAMPLE_NUM. It is FASTER to set BATCH to SAMPLE_NUM; setting BATCH to 1 requires the least memory. (Try 1000 if you have no preference.) (A zero or negative value terminates execution.) Enter BATCH: User input BATCH = 1000 OUTPUT is a file in which to store the data. (Try 'cvt.txt' if you have no preference.) (A blank value terminates execution). Enter OUTPUT: User input OUTPUT = "cvt13.txt". Step SEED L2-Change Energy 0 123456789 1 1834292263 2.66462 0.00572426 2 1834292263 1.11845 0.00290253 3 1834292263 0.680638 0.00244474 4 1834292263 0.476822 0.00229378 5 1834292263 0.383336 0.00221758 6 1834292263 0.327513 0.00216664 7 1834292263 0.278281 0.00212956 8 1834292263 0.250234 0.00210269 9 1834292263 0.225733 0.00208105 10 1834292263 0.201014 0.00206325 11 1834292263 0.18157 0.00204872 12 1834292263 0.165889 0.00203652 13 1834292263 0.147881 0.00202649 14 1834292263 0.135275 0.0020182 15 1834292263 0.120912 0.00201128 16 1834292263 0.106985 0.00200588 17 1834292263 0.0991486 0.00200171 18 1834292263 0.0903061 0.00199813 19 1834292263 0.0811986 0.0019951 20 1834292263 0.079776 0.00199235 21 1834292263 0.0763044 0.0019898 22 1834292263 0.0753241 0.00198743 23 1834292263 0.0743302 0.00198511 24 1834292263 0.0730392 0.00198291 25 1834292263 0.0694138 0.00198075 26 273452423 0.162865 0.0019909 27 273452423 0.109589 0.00198335 28 273452423 0.0979653 0.00197887 29 273452423 0.086838 0.0019754 30 273452423 0.0771192 0.00197271 31 273452423 0.0718237 0.00197049 32 273452423 0.0668926 0.00196841 33 273452423 0.0606867 0.00196666 34 273452423 0.0548609 0.00196524 35 273452423 0.0562855 0.00196395 36 273452423 0.0516542 0.00196265 37 273452423 0.0480079 0.00196159 38 273452423 0.0452901 0.00196069 39 273452423 0.0390444 0.00195992 40 273452423 0.0409164 0.00195929 41 273452423 0.0405629 0.00195861 42 273452423 0.0409205 0.00195794 43 273452423 0.0430092 0.00195722 44 273452423 0.0386517 0.00195644 45 273452423 0.0372151 0.00195578 46 273452423 0.0347906 0.00195516 47 273452423 0.0320288 0.00195459 48 273452423 0.0336831 0.00195406 49 273452423 0.0332511 0.00195343 50 273452423 0.0335316 0.00195278 51 1760937562 0.147489 0.00196813 52 1760937562 0.0886637 0.0019626 53 1760937562 0.0663247 0.00196031 54 1760937562 0.0563093 0.00195892 55 1760937562 0.0496108 0.00195788 56 1760937562 0.0477238 0.00195702 57 1760937562 0.0431488 0.00195621 58 1760937562 0.0382834 0.00195552 59 1760937562 0.0343834 0.00195498 60 1760937562 0.032212 0.00195454 61 1760937562 0.0336713 0.00195411 62 1760937562 0.0337341 0.00195362 63 1760937562 0.0330306 0.00195313 64 1760937562 0.0336369 0.00195263 65 1760937562 0.03132 0.00195212 66 1760937562 0.0281561 0.00195168 67 1760937562 0.0281878 0.00195131 68 1760937562 0.0299574 0.00195092 69 1760937562 0.0311658 0.00195048 70 1760937562 0.0275533 0.00195002 71 1760937562 0.0274047 0.00194965 72 1760937562 0.0254639 0.00194929 73 1760937562 0.0274803 0.00194895 74 1760937562 0.0282754 0.00194855 75 1760937562 0.0275034 0.00194811 76 984792849 0.14863 0.00196469 77 984792849 0.0940256 0.00195862 78 984792849 0.0718911 0.00195587 79 984792849 0.0640687 0.00195406 80 984792849 0.0591406 0.00195254 81 984792849 0.0573531 0.00195115 82 984792849 0.0535916 0.00194979 83 984792849 0.0544104 0.00194855 84 984792849 0.0512304 0.00194732 85 984792849 0.0453693 0.00194623 86 984792849 0.0442128 0.00194528 87 984792849 0.0429368 0.00194432 88 984792849 0.0436803 0.00194324 89 984792849 0.0442735 0.00194187 90 984792849 0.0460272 0.00194039 91 984792849 0.043278 0.00193903 92 984792849 0.0378977 0.00193806 93 984792849 0.0307655 0.00193738 94 984792849 0.028761 0.00193695 95 984792849 0.0279226 0.0019366 96 984792849 0.0297736 0.00193625 97 984792849 0.0273653 0.00193588 98 984792849 0.027021 0.00193554 99 984792849 0.0248723 0.00193522 100 984792849 0.0245796 0.00193495 The data was written to the file "cvt13.txt" * * * Ready to generate a new dataset: * * Enter DIM_NUM, the spatial dimension: (Try '2' if you have no preference.) (0 or any negative value terminates execution). User input DIM_NUM = -1 CVT_DATASET The input value of DIM_NUM = -1 is interpreted as a request for termination. Normal end of execution. 23 June 2005 11:47:20 AM