>> ccvt_reflect_test 02-Jan-2019 21:58:58 CCVT_REFLECT_TEST MATLAB version Test CCVT_REFLECT. 02-Jan-2019 21:58:58 CCVT_REFLECT MATLAB version Generate and animate 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: * NDIM, the spatial dimension, * N, the number of points to generate, * SEED, a seed to use for random number generation, * INIT_STRING, initialize the points: ** file, read data from a file; ** 'GRID', by picking points from a grid; ** 'HALTON', from a Halton sequence; ** 'RAND', using MATLAB's RAND function; ** 'UNIFORM', using a simple uniform RNG; * IT_MAX, the maximum number of iterations. * IT_FIXED, the number of iterative steps to take using a fixed set of sampling points. * SAMPLE_STRING, how to conduct the sampling. ** 'GRID', by picking points from a grid; ** 'HALTON', from a Halton sequence; ** 'RAND', using MATLAB's RAND function; ** 'UNIFORM', using a simple uniform RNG; * SAMPLE_NUM, the number of sample points; * BATCH, the number of sampling points to create at one time; * MOVIE_NAME is the name of the file in which the movie is stored; * OUTPUT, a file into which the data is stored. 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: * * NDIM is the spatial dimension. NDIM = 2 N is the number of points to generate. User input N = 100 SEED is a seed for the random number generation. SEED = 123456789 INIT_STRING 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; 'RAND' using MATLAB's RAND function; 'UNIFORM' using a simple uniform RNG; User input INIT_STRING = "rand". User input INIT = "-1". 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. User input IT_MAX = 50 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. User input IT_FIXED = 1 SAMPLE_STRING is the method of sampling the region: 'GRID' by picking points from a grid; 'HALTON' from a Halton sequence; 'RAND' using MATLAB's RAND function; 'UNIFORM' using a simple uniform RNG; User input SAMPLE_STRING = "rand". Numeric value of SAMPLE = -1 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. 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. BATCH = 1000 MOVIE_NAME is the name of the file in which the movie is stored; User input MOVIE_NAME = ccvt_reflect_test.avi Deleting old copy of ccvt_reflect_test.avi FILE_DELETE: Deleting old version of "ccvt_reflect_test.avi". OUTPUT is a file into which the data is stored; OUTPUT = "ccvt_reflect_test_output.txt". Step SEED Energy 0 123456789 4.002434e-03 FILE_DELETE: Deleting old version of "initial.eps". 0 123656989 4.010710e-03 1 123856989 2.343768e-03 2 124056989 2.079790e-03 3 124256989 1.976657e-03 4 124456989 1.944142e-03 5 124656989 1.902963e-03 6 124856989 1.882167e-03 7 125056989 1.867026e-03 8 125256989 1.842430e-03 9 125456989 1.830134e-03 10 125656989 1.819170e-03 11 125856989 1.813991e-03 12 126056989 1.808031e-03 13 126256989 1.813153e-03 14 126456989 1.802041e-03 15 126656989 1.807378e-03 16 126856989 1.804857e-03 17 127056989 1.793428e-03 18 127256989 1.796935e-03 19 127456989 1.803555e-03 20 127656989 1.794994e-03 21 127856989 1.798547e-03 22 128056989 1.791118e-03 23 128256989 1.795339e-03 24 128456989 1.794499e-03 25 128656989 1.789085e-03 26 128856989 1.794743e-03 27 129056989 1.793046e-03 28 129256989 1.786528e-03 29 129456989 1.792650e-03 30 129656989 1.785901e-03 31 129856989 1.791283e-03 32 130056989 1.788552e-03 33 130256989 1.783366e-03 34 130456989 1.787188e-03 35 130656989 1.790564e-03 36 130856989 1.789150e-03 37 131056989 1.792281e-03 38 131256989 1.786136e-03 39 131456989 1.792173e-03 40 131656989 1.782099e-03 41 131856989 1.780994e-03 42 132056989 1.785199e-03 43 132256989 1.785327e-03 44 132456989 1.779136e-03 45 132656989 1.788481e-03 46 132856989 1.787409e-03 47 133056989 1.784559e-03 48 133256989 1.791475e-03 49 133456989 1.792385e-03 50 133656989 1.783382e-03 The data was written to the file "ccvt_reflect_test_output.txt". FILE_DELETE: Deleting old version of "final.eps". CCVT_REFLECT: Normal end of execution. 02-Jan-2019 21:59:41 CCVT_REFLECT_TEST Normal end of execution. 02-Jan-2019 21:59:41 >>