19 December 2011 12:12:36 PM CVT_PRB C++ version Test the CVT library. TEST01 CVT computes a Centroidal Voronoi Tessellation. Step SEED L2-Change Energy 0 123456789 1 29242052 0.894003 0.0341992 2 396524255 0.282456 0.0227668 3 1804077568 0.216157 0.0208566 4 58279807 0.147749 0.0194428 5 890554932 0.128341 0.0189718 6 214536894 0.0896017 0.0185956 7 1592773222 0.110235 0.0185661 8 1874550474 0.0923677 0.0180957 9 2041615702 0.0844138 0.0180861 10 2056573688 0.0894152 0.0179934 11 1522461057 0.0793574 0.0174908 12 1338654111 0.0780986 0.0176556 13 758290347 0.0798384 0.0174853 14 1895558656 0.072561 0.0175588 15 553115540 0.0647118 0.0170402 16 1150573110 0.0693647 0.0173554 17 1130930562 0.0679317 0.0172361 18 1398936087 0.0676794 0.0171615 19 1351174075 0.0553915 0.0170118 20 1271270653 0.045311 0.017304 21 383674773 0.0524936 0.0171891 22 533903734 0.0455962 0.0173221 23 412527942 0.0539334 0.0169113 24 498761874 0.0542702 0.0170894 25 1767322623 0.0589669 0.0172366 26 8802113 0.0403824 0.0171411 27 337656644 0.0354078 0.0169869 28 982491412 0.0462197 0.0170618 29 1661195312 0.0410608 0.0171023 30 1727223671 0.0370304 0.0170044 31 1934076831 0.0422558 0.0171544 32 286968437 0.0552392 0.0170518 33 1651892980 0.0335086 0.0173532 34 1093660108 0.0437507 0.0172462 35 1312296485 0.0499496 0.0170844 36 1505118054 0.0448528 0.0172807 37 1225827697 0.046553 0.0173194 38 2103031061 0.0454517 0.0170251 39 237994259 0.0452241 0.0170616 40 308344071 0.0485959 0.0171959 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 878651545 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.0485959 CVT ENERGY = 0.0171959 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.177221 0.881571 2 0.837556 0.827059 3 0.515287 0.50184 4 0.507924 0.167342 5 0.17998 0.630281 6 0.175928 0.375518 7 0.512095 0.837544 8 0.8305 0.167848 9 0.832437 0.49591 10 0.168871 0.121883 TEST02 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with twice the number of iterations. Step SEED L2-Change Energy 0 123456789 1 29242052 0.894003 0.0341992 2 396524255 0.282456 0.0227668 3 1804077568 0.216157 0.0208566 4 58279807 0.147749 0.0194428 5 890554932 0.128341 0.0189718 6 214536894 0.0896017 0.0185956 7 1592773222 0.110235 0.0185661 8 1874550474 0.0923677 0.0180957 9 2041615702 0.0844138 0.0180861 10 2056573688 0.0894152 0.0179934 11 1522461057 0.0793574 0.0174908 12 1338654111 0.0780986 0.0176556 13 758290347 0.0798384 0.0174853 14 1895558656 0.072561 0.0175588 15 553115540 0.0647118 0.0170402 16 1150573110 0.0693647 0.0173554 17 1130930562 0.0679317 0.0172361 18 1398936087 0.0676794 0.0171615 19 1351174075 0.0553915 0.0170118 20 1271270653 0.045311 0.017304 21 383674773 0.0524936 0.0171891 22 533903734 0.0455962 0.0173221 23 412527942 0.0539334 0.0169113 24 498761874 0.0542702 0.0170894 25 1767322623 0.0589669 0.0172366 26 8802113 0.0403824 0.0171411 27 337656644 0.0354078 0.0169869 28 982491412 0.0462197 0.0170618 29 1661195312 0.0410608 0.0171023 30 1727223671 0.0370304 0.0170044 31 1934076831 0.0422558 0.0171544 32 286968437 0.0552392 0.0170518 33 1651892980 0.0335086 0.0173532 34 1093660108 0.0437507 0.0172462 35 1312296485 0.0499496 0.0170844 36 1505118054 0.0448528 0.0172807 37 1225827697 0.046553 0.0173194 38 2103031061 0.0454517 0.0170251 39 237994259 0.0452241 0.0170616 40 308344071 0.0485959 0.0171959 41 878651545 0.0384488 0.0169558 42 336554041 0.0446802 0.0169741 43 69693939 0.0406031 0.01724 44 107597223 0.0455383 0.0170555 45 284388055 0.0457238 0.0170303 46 821532605 0.0342493 0.0170288 47 1912444717 0.043074 0.0168691 48 2139238658 0.0619502 0.0171038 49 1514249906 0.0443638 0.0172428 50 765384573 0.047293 0.0171673 51 599511796 0.0476441 0.017042 52 1929718247 0.0528515 0.0169855 53 1495267469 0.0583349 0.0171623 54 346287018 0.0352082 0.0171424 55 972591208 0.0401454 0.017292 56 1170908305 0.0340672 0.0169268 57 2101087755 0.0464037 0.0169408 58 1585775448 0.0435308 0.0169897 59 1719007417 0.0499637 0.0171717 60 47014704 0.0339901 0.0169108 61 325311895 0.0489171 0.0172636 62 2114713435 0.0421041 0.0169469 63 469955390 0.0426363 0.0172777 64 2044044375 0.0426293 0.016918 65 1902665122 0.0428674 0.0171021 66 999386148 0.0487739 0.0170876 67 1762727540 0.0440732 0.0168713 68 886787757 0.0412669 0.0168755 69 1442441010 0.0446389 0.017055 70 766630007 0.0451691 0.0169835 71 473489672 0.0284714 0.0170666 72 1247561645 0.0218333 0.0172089 73 1093781229 0.0448161 0.0171667 74 1723735430 0.0418775 0.0169445 75 1100723884 0.053826 0.0170276 76 2145312587 0.0445739 0.016973 77 1556984304 0.0382201 0.0170677 78 1035291506 0.0379373 0.0168976 79 158213521 0.0430769 0.017176 80 1863192335 0.0409068 0.0170555 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 343175222 INIT = "uniform". Max iterations IT_MAX = 80 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 80 Difference IT_DIFF = 0.0409068 CVT ENERGY = 0.0170555 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.165613 0.88107 2 0.839858 0.824262 3 0.517269 0.510056 4 0.512253 0.168433 5 0.18206 0.631697 6 0.183971 0.377948 7 0.51091 0.847692 8 0.834976 0.161121 9 0.838384 0.491932 10 0.161762 0.123829 TEST03 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with 100 times the sample points. Step SEED L2-Change Energy 0 123456789 1 29242052 0.891341 0.0342772 2 720688506 0.289915 0.0228225 3 681172 0.196616 0.0206609 4 539098006 0.148381 0.0195944 5 1544551628 0.115851 0.0190718 6 1039137261 0.0955313 0.018728 7 1856120581 0.0847977 0.0184977 8 1398888834 0.0813854 0.0182595 9 777275849 0.0767749 0.0180697 10 193908656 0.0680758 0.0179055 11 594766309 0.0612229 0.0177656 12 1528604881 0.0548518 0.0176166 13 2135424592 0.0475163 0.0175367 14 843278689 0.0442446 0.0174432 15 1298034490 0.0395302 0.0174158 16 1774985135 0.0382671 0.0173608 17 58892340 0.0381073 0.0173342 18 497310354 0.0367439 0.0173065 19 1555340604 0.0369268 0.0172445 20 573219264 0.0349441 0.0172139 21 769258892 0.0342414 0.0171684 22 1733894875 0.0309426 0.0171455 23 1708504563 0.0301623 0.0171164 24 332981687 0.0232216 0.0171018 25 871833470 0.0192951 0.0170897 26 491107991 0.0165673 0.0170719 27 64836647 0.0134558 0.0170782 28 954805664 0.0122848 0.017064 29 1033236242 0.0106287 0.0170655 30 1875753496 0.0086395 0.0170642 31 932903206 0.0073009 0.0170759 32 900419333 0.00807631 0.0170675 33 898406847 0.0067425 0.0170617 34 957321340 0.00552044 0.0170549 35 1879036371 0.00568719 0.0170536 36 550745514 0.00570691 0.0170615 37 1822412817 0.00414794 0.0170694 38 1926341691 0.0045748 0.0170754 39 578466603 0.00436618 0.0170465 40 1767869167 0.00487635 0.0170515 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 1282315487 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.00487635 CVT ENERGY = 0.0170515 SAMPLE = "uniform". Samples SAMPLE_NUM = 1000000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.168348 0.878131 2 0.835356 0.834497 3 0.522646 0.495763 4 0.504354 0.163497 5 0.182525 0.627963 6 0.181252 0.37407 7 0.507305 0.832846 8 0.833868 0.168015 9 0.84306 0.503669 10 0.16697 0.122596 TEST04 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with Halton sampling. Step SEED L2-Change Energy 0 123456789 1 29242052 0.891216 0.0343097 2 29252052 0.288803 0.0228219 3 29262052 0.197451 0.0206285 4 29272052 0.147651 0.019631 5 29282052 0.114822 0.0190746 6 29292052 0.091279 0.0187413 7 29302052 0.0881447 0.0184914 8 29312052 0.0834449 0.018289 9 29322052 0.0764799 0.0180856 10 29332052 0.0694811 0.0178958 11 29342052 0.0630638 0.0177408 12 29352052 0.0584744 0.0176286 13 29362052 0.0467737 0.0175337 14 29372052 0.0439615 0.0174729 15 29382052 0.0381346 0.0174079 16 29392052 0.0361653 0.0173685 17 29402052 0.0338155 0.017335 18 29412052 0.034764 0.0173119 19 29422052 0.0370236 0.0172637 20 29432052 0.0332875 0.0172346 21 29442052 0.0338583 0.0171907 22 29452052 0.0346095 0.017172 23 29462052 0.0292151 0.0171384 24 29472052 0.0249785 0.0171085 25 29482052 0.0235822 0.0171081 26 29492052 0.0208278 0.0170814 27 29502052 0.0163216 0.017081 28 29512052 0.0147677 0.0170736 29 29522052 0.00959128 0.0170707 30 29532052 0.00965591 0.0170748 31 29542052 0.0103077 0.0170605 32 29552052 0.00922519 0.0170692 33 29562052 0.00855507 0.0170648 34 29572052 0.00462562 0.0170649 35 29582052 0.00778368 0.017059 36 29592052 0.00804507 0.0170697 37 29602052 0.00532861 0.0170603 38 29612052 0.00762241 0.0170604 39 29622052 0.00656653 0.0170676 40 29632052 0.00601047 0.0170602 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 29642052 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.00601047 CVT ENERGY = 0.0170602 SAMPLE = "halton". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.168423 0.877673 2 0.834415 0.8345 3 0.523113 0.496708 4 0.504477 0.164092 5 0.181816 0.627303 6 0.181405 0.37413 7 0.506539 0.833295 8 0.833916 0.167607 9 0.843147 0.502631 10 0.167289 0.122778 TEST05 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with grid sampling. Step SEED L2-Change Energy 0 123456789 1 29242052 0.893061 0.0343146 2 29252052 0.289203 0.0227997 3 29262052 0.191803 0.0206152 4 29272052 0.151945 0.0196342 5 29282052 0.114419 0.0190604 6 29292052 0.0953433 0.0187223 7 29302052 0.0882927 0.018477 8 29312052 0.0807068 0.018252 9 29322052 0.0740999 0.0180467 10 29332052 0.069387 0.0178682 11 29342052 0.0617032 0.0177185 12 29352052 0.054034 0.0176023 13 29362052 0.049349 0.0175148 14 29372052 0.0453248 0.017445 15 29382052 0.0410136 0.0173879 16 29392052 0.0404491 0.0173423 17 29402052 0.0363734 0.0172994 18 29412052 0.0386173 0.0172591 19 29422052 0.033706 0.0172195 20 29432052 0.0348322 0.0171845 21 29442052 0.0325123 0.017152 22 29452052 0.0296615 0.0171244 23 29462052 0.0258298 0.0171041 24 29472052 0.0191302 0.0170893 25 29482052 0.0163887 0.0170801 26 29492052 0.016612 0.0170734 27 29502052 0.0101622 0.017068 28 29512052 0.00869609 0.017066 29 29522052 0.00711799 0.0170644 30 29532052 0.00933886 0.0170631 31 29542052 0.0099874 0.017061 32 29552052 0.00843242 0.0170586 33 29562052 0.00567676 0.017057 34 29572052 0.00496383 0.0170562 35 29582052 0.00316031 0.0170556 36 29592052 0.0019895 0.0170554 37 29602052 0.00163045 0.0170553 38 29612052 0.00212202 0.0170552 39 29622052 0.00126376 0.0170551 40 29632052 0.00196881 0.017055 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 29642052 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.00196881 CVT ENERGY = 0.017055 SAMPLE = "grid". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.168405 0.877954 2 0.835 0.835 3 0.521436 0.496652 4 0.505149 0.163885 5 0.181755 0.627263 6 0.181448 0.372936 7 0.506241 0.833254 8 0.834008 0.168066 9 0.841564 0.503507 10 0.167071 0.122429 TEST06 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with C++ RANDOM sampling. Step SEED L2-Change Energy 0 123456789 1 29242052 0.903708 0.0343442 2 29262052 0.302997 0.0227797 3 29282052 0.193319 0.0203608 4 29302052 0.166492 0.0198452 5 29322052 0.119876 0.0188379 6 29342052 0.101891 0.0189786 7 29362052 0.0775388 0.0184031 8 29382052 0.0976992 0.0183659 9 29402052 0.0917191 0.018086 10 29422052 0.0987276 0.0178927 11 29442052 0.0787458 0.0177317 12 29462052 0.0620869 0.0178425 13 29482052 0.0730933 0.0174683 14 29502052 0.0740955 0.0174074 15 29522052 0.0610775 0.0174041 16 29542052 0.0664173 0.0172467 17 29562052 0.0776102 0.0174324 18 29582052 0.0805965 0.0172895 19 29602052 0.0610304 0.0171686 20 29622052 0.0496271 0.0170542 21 29642052 0.0629684 0.0171798 22 29662052 0.0696681 0.0171828 23 29682052 0.0542842 0.0171722 24 29702052 0.0475971 0.0169278 25 29722052 0.0656928 0.0169433 26 29742052 0.058319 0.0171978 27 29762052 0.0593201 0.0170218 28 29782052 0.0443402 0.0171465 29 29802052 0.0404501 0.0170556 30 29822052 0.0343896 0.0171685 31 29842052 0.0489993 0.0170156 32 29862052 0.0414661 0.0171505 33 29882052 0.0420126 0.017029 34 29902052 0.0352825 0.017 35 29922052 0.0458201 0.016874 36 29942052 0.0441877 0.0169173 37 29962052 0.0384276 0.0168991 38 29982052 0.0512593 0.0169746 39 30002052 0.0417622 0.0170628 40 30022052 0.0395636 0.0168402 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 30042052 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.0395636 CVT ENERGY = 0.0168402 SAMPLE = "random". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.168119 0.841328 2 0.835918 0.841343 3 0.635667 0.488972 4 0.496549 0.156328 5 0.121667 0.503036 6 0.371803 0.49402 7 0.508943 0.832319 8 0.833309 0.158946 9 0.883516 0.505827 10 0.166421 0.164079 TEST07 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1 with a different seed. Step SEED L2-Change Energy 0 987654321 1 1525819924 0.779617 0.0375864 2 1703739660 0.335124 0.0235012 3 1956211282 0.263587 0.0205568 4 703763026 0.20883 0.0190352 5 878628297 0.155644 0.0182337 6 1552444705 0.131115 0.0179807 7 390357255 0.10034 0.0175581 8 689833854 0.081078 0.0171984 9 1751610365 0.0590405 0.0172249 10 852519522 0.0612045 0.0172549 11 309030697 0.0498519 0.0169421 12 1316592958 0.0567054 0.0170051 13 1105896658 0.0402091 0.0170864 14 1045195875 0.0475292 0.0172564 15 1897548003 0.046031 0.0168903 16 1870465968 0.0663721 0.0170942 17 789370021 0.0540503 0.0171105 18 444524362 0.0430103 0.0171986 19 689805975 0.0416176 0.017129 20 1558080092 0.0484341 0.0171524 21 1381530061 0.0488051 0.0171808 22 157511124 0.0548749 0.0171288 23 16143349 0.040575 0.0171588 24 1155157008 0.0531548 0.0171345 25 25788210 0.0486587 0.0170697 26 1456770040 0.0480539 0.0170593 27 922599524 0.0453087 0.0171624 28 910060503 0.0287569 0.017053 29 1036849277 0.0432717 0.0169255 30 1558644233 0.0524572 0.0170366 31 192063102 0.0460884 0.0173346 32 61275996 0.051225 0.0168392 33 1575049278 0.044581 0.0170993 34 339755903 0.0382646 0.0171637 35 1360647670 0.0352869 0.0169646 36 1802859403 0.0452827 0.0169186 37 2066534888 0.0496416 0.0169849 38 101044121 0.0499054 0.0169678 39 340723523 0.0548338 0.017317 40 1321862545 0.0486929 0.0171412 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 987654321 Current SEED = 1047111519 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.0486929 CVT ENERGY = 0.0171412 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.833068 0.836707 2 0.499362 0.522698 3 0.122098 0.170059 4 0.499436 0.846036 5 0.374483 0.183824 6 0.881976 0.180629 7 0.628776 0.179369 8 0.83569 0.513866 9 0.160909 0.834702 10 0.167995 0.510114 TEST08 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1 with a different batch size. Step SEED L2-Change Energy 0 123456789 1 29242052 0.894003 0.0341992 2 396524255 0.282456 0.0227668 3 1804077568 0.216157 0.0208566 4 58279807 0.147749 0.0194428 5 890554932 0.128341 0.0189718 6 214536894 0.0896017 0.0185956 7 1592773222 0.110235 0.0185661 8 1874550474 0.0923677 0.0180957 9 2041615702 0.0844138 0.0180861 10 2056573688 0.0894152 0.0179934 11 1522461057 0.0793574 0.0174908 12 1338654111 0.0780986 0.0176556 13 758290347 0.0798384 0.0174853 14 1895558656 0.072561 0.0175588 15 553115540 0.0647118 0.0170402 16 1150573110 0.0693647 0.0173554 17 1130930562 0.0679317 0.0172361 18 1398936087 0.0676794 0.0171615 19 1351174075 0.0553915 0.0170118 20 1271270653 0.045311 0.017304 21 383674773 0.0524936 0.0171891 22 533903734 0.0455962 0.0173221 23 412527942 0.0539334 0.0169113 24 498761874 0.0542702 0.0170894 25 1767322623 0.0589669 0.0172366 26 8802113 0.0403824 0.0171411 27 337656644 0.0354078 0.0169869 28 982491412 0.0462197 0.0170618 29 1661195312 0.0410608 0.0171023 30 1727223671 0.0370304 0.0170044 31 1934076831 0.0422558 0.0171544 32 286968437 0.0552392 0.0170518 33 1651892980 0.0335086 0.0173532 34 1093660108 0.0437507 0.0172462 35 1312296485 0.0499496 0.0170844 36 1505118054 0.0448528 0.0172807 37 1225827697 0.046553 0.0173194 38 2103031061 0.0454517 0.0170251 39 237994259 0.0452241 0.0170616 40 308344071 0.0485959 0.0171959 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 878651545 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.0485959 CVT ENERGY = 0.0171959 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 5 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.177221 0.881571 2 0.837556 0.827059 3 0.515287 0.50184 4 0.507924 0.167342 5 0.17998 0.630281 6 0.175928 0.375518 7 0.512095 0.837544 8 0.8305 0.167848 9 0.832437 0.49591 10 0.168871 0.121883 TEST09 CVT computes a Centroidal Voronoi Tessellation. Repeat test 1, but with IT_FIXED = IT_MAX. Step SEED L2-Change Energy 0 123456789 1 29242052 0.894003 0.0341992 2 29242052 0.290538 0.0225839 3 29242052 0.19289 0.0203881 4 29242052 0.144945 0.019433 5 29242052 0.109668 0.0188835 6 29242052 0.0945755 0.0185518 7 29242052 0.0888668 0.01828 8 29242052 0.0794188 0.0180411 9 29242052 0.0627518 0.0178532 10 29242052 0.0541182 0.0177236 11 29242052 0.0519131 0.0176234 12 29242052 0.0445733 0.0175386 13 29242052 0.0423926 0.0174759 14 29242052 0.0400686 0.0174234 15 29242052 0.0328689 0.0173815 16 29242052 0.0352705 0.0173515 17 29242052 0.0358236 0.0173161 18 29242052 0.0305396 0.0172814 19 29242052 0.0323227 0.0172546 20 29242052 0.0296778 0.0172291 21 29242052 0.0335232 0.0172057 22 29242052 0.034545 0.0171782 23 29242052 0.0340715 0.0171455 24 29242052 0.0350848 0.017115 25 29242052 0.0312048 0.0170835 26 29242052 0.0326844 0.017056 27 29242052 0.030847 0.0170291 28 29242052 0.0220204 0.0170101 29 29242052 0.0156295 0.0170002 30 29242052 0.0135193 0.0169942 31 29242052 0.0128183 0.0169899 32 29242052 0.0116499 0.0169863 33 29242052 0.00743031 0.0169838 34 29242052 0.00613024 0.0169825 35 29242052 0.00327818 0.0169818 36 29242052 0.00216196 0.0169816 37 29242052 0.00196935 0.0169814 38 29242052 0.00195574 0.0169813 39 29242052 0.000661864 0.0169812 40 29242052 0.000340235 0.0169812 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 123456789 Current SEED = 396524255 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 40 Iterations IT_NUM = 40 Difference IT_DIFF = 0.000340235 CVT ENERGY = 0.0169812 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.172088 0.875224 2 0.835165 0.835221 3 0.523955 0.505164 4 0.506095 0.1705 5 0.178812 0.623009 6 0.184022 0.36813 7 0.521193 0.838361 8 0.830412 0.174849 9 0.849083 0.50244 10 0.161318 0.12197 TEST10 CVT computes a Centroidal Voronoi Tessellation. Compute 100 points in 3D. Step SEED L2-Change Energy 0 123456789 1 162518201 5.57587 0.0190278 2 914652320 2.49933 0.0140927 3 1182014520 1.78588 0.0132761 4 734877640 1.45927 0.0127762 5 1808590614 1.32221 0.01257 6 1376754667 1.32483 0.0123813 7 39225810 1.25293 0.0123157 8 1835665933 1.28869 0.0121779 9 683368702 1.35712 0.0120906 10 1192180323 1.20834 0.0119992 11 1451564322 1.19038 0.0120351 12 1525473369 1.2008 0.0119416 13 1258784351 1.24234 0.0119818 14 1939780355 1.21881 0.0119339 15 1792150340 1.18209 0.0118777 16 1077745899 1.2187 0.0117696 17 1381981537 1.12158 0.0118138 18 2135871724 1.1179 0.0118126 19 733709902 1.18605 0.011747 20 1511987296 1.22924 0.011814 21 1849799130 1.13968 0.0117194 22 1011187751 1.10846 0.0117439 23 430762708 1.16705 0.0117559 24 2076182163 1.17188 0.0117496 25 662061697 1.16875 0.0117679 26 253385434 1.1955 0.0117509 27 836175832 1.21857 0.0117125 28 529591688 1.11309 0.0116645 29 154633765 1.06732 0.011664 30 778723351 1.13039 0.0117331 31 1341651177 1.0458 0.0117254 32 11115418 1.13412 0.0117639 33 181250519 1.17763 0.0117109 34 628655915 1.20557 0.0116684 35 1574892130 1.06589 0.0117044 36 1853258335 1.18568 0.011821 37 1106992749 1.2447 0.0116229 38 2113411425 1.11724 0.0117031 39 1552081075 1.19059 0.0117267 40 921807728 1.11009 0.0117345 Dimension DIM_NUM = 3 Number of points N = 100 Initial SEED = 123456789 Current SEED = 1707197995 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 1.11009 CVT ENERGY = 0.0117345 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 First 10 Generators (rows): Row: 1 2 3 Col 1 0.351377 0.914543 0.887342 2 0.442049 0.326834 0.0766195 3 0.344176 0.126858 0.0970615 4 0.708074 0.13077 0.625162 5 0.486658 0.738148 0.867735 6 0.121716 0.915644 0.382635 7 0.0944656 0.107437 0.894845 8 0.864948 0.08426 0.103335 9 0.345125 0.917712 0.0920808 10 0.383596 0.912549 0.303727 TEST11 CVT computes a Centroidal Voronoi Tessellation. In this test, we initialize the generators to grid points; this is an unstable CVT solution. Initial generators (rows): Row: 1 2 Col 1 0.125 0.125 2 0.125 0.375 3 0.125 0.625 4 0.125 0.875 5 0.375 0.125 6 0.375 0.375 7 0.375 0.625 8 0.375 0.875 9 0.625 0.125 10 0.625 0.375 11 0.625 0.625 12 0.625 0.875 13 0.875 0.125 14 0.875 0.375 15 0.875 0.625 16 0.875 0.875 Step SEED L2-Change Energy 0 123456789 1 123456789 0.184676 0.0104645 2 1328042058 0.22232 0.0109921 3 1539989115 0.201793 0.0105597 4 200382020 0.20192 0.0102265 5 1958948863 0.213678 0.0100604 6 691823909 0.20304 0.0105555 7 655816003 0.215078 0.010879 8 450926852 0.255184 0.0106902 9 1273398721 0.229146 0.0105937 10 1462772409 0.268891 0.0104215 11 1371189933 0.248441 0.0110927 12 845524934 0.230812 0.0103771 13 2013025619 0.230834 0.0105547 14 1021685265 0.243548 0.0106436 15 204970068 0.234963 0.0107517 16 778034624 0.220926 0.0104433 17 1938972586 0.214835 0.0107308 18 1519833303 0.236056 0.0103129 19 2077270047 0.204623 0.0104908 20 1923497586 0.147344 0.0104238 21 167698528 0.228753 0.0104184 22 1655479938 0.203957 0.0103765 23 475051709 0.205094 0.0101175 24 83696007 0.193407 0.010184 25 1805594913 0.206495 0.0102934 26 508154254 0.201934 0.0102935 27 1861070898 0.211749 0.0106608 28 1661633678 0.186082 0.0103931 29 914834335 0.203476 0.0103582 30 715643788 0.179335 0.0105834 31 810642687 0.192833 0.0103902 32 471503978 0.231163 0.0105449 33 1019331795 0.254 0.0108418 34 2118751796 0.206527 0.0109332 35 1168375939 0.221747 0.010842 36 26482542 0.229215 0.0103332 37 2056065863 0.202172 0.0108177 38 414064984 0.237834 0.0104714 39 1342855162 0.165339 0.0102104 40 444956424 0.20282 0.010034 Dimension DIM_NUM = 2 Number of points N = 16 Initial SEED = 123456789 Current SEED = 2115448041 INIT = "user initialization". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.20282 CVT ENERGY = 0.010034 SAMPLE = "uniform". Samples SAMPLE_NUM = 1000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.124407 0.131737 2 0.131095 0.399531 3 0.11756 0.641729 4 0.137583 0.894953 5 0.360939 0.11324 6 0.37763 0.310748 7 0.369431 0.567716 8 0.383183 0.864456 9 0.604839 0.137584 10 0.607581 0.387287 11 0.623353 0.630739 12 0.623385 0.882404 13 0.872884 0.117162 14 0.867112 0.360631 15 0.866551 0.602682 16 0.864296 0.865609 TEST12 The "random" initialization option calls the system random number generator. There is some question about whether this works correctly. The test is as follows: CVT call #1: DIM_NUM = 2 N = 10 INIT = -1 IT_MAX = 0 SEED = 100000 Print output values of SEED and R #1. CVT call #2: (jump SEED) DIM_NUM = 2 N = 10 INIT = -1 IT_MAX = 0 SEED = 200000. Print output values of SEED and R #2. CVT call #3: (restore SEED) DIM_NUM = 2 N = 10 INIT = -1 IT_MAX = 0 SEED_INIT = 100000 Print output values of SEED and R #3. We expect that: * the values of R #1 and R #2 differ; AND * the values of R #1 and R #3 agree. Step SEED L2-Change Energy 0 100000 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 100000 Current SEED = 100020 INIT = "random". Max iterations IT_MAX = 0 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 0 Difference IT_DIFF = 0 CVT ENERGY = 0 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.263523 0.357805 2 0.764996 0.930318 3 0.703346 0.721002 4 0.510653 0.522786 5 0.194135 0.859737 6 0.67418 0.83412 7 0.968798 0.867816 8 0.852169 0.0990934 9 0.776466 0.489523 10 0.378783 0.307769 Step SEED L2-Change Energy 0 200000 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 200000 Current SEED = 200020 INIT = "random". Max iterations IT_MAX = 0 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 0 Difference IT_DIFF = 0 CVT ENERGY = 0 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.871041 0.760328 2 0.487934 0.972382 3 0.105461 0.80595 4 0.417141 0.868888 5 0.467359 0.397719 6 0.974504 0.730882 7 0.755525 0.739501 8 0.6612 0.45887 9 0.460503 0.171853 10 0.981656 0.654638 Step SEED L2-Change Energy 0 100000 Dimension DIM_NUM = 2 Number of points N = 10 Initial SEED = 100000 Current SEED = 100020 INIT = "random". Max iterations IT_MAX = 0 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 0 Difference IT_DIFF = 0 CVT ENERGY = 0 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 2 Col 1 0.03159 0.655836 2 0.488758 0.000388371 3 0.523651 0.340927 4 0.0994818 0.300118 5 0.83045 0.478264 6 0.607887 0.701491 7 0.238593 0.0958206 8 0.673873 0.344053 9 0.90177 0.0910138 10 0.212942 0.369129 TEST13 CVT computes a Centroidal Voronoi Tessellation. In this example, we call the "USER" routine, which allows the user to define the geometry and density implicitly, by returning sample points. Step SEED L2-Change Energy 0 123456789 1 123456789 4.15331 0.00968421 2 123456789 1.74402 0.00665143 3 123456789 1.22263 0.00607219 4 123456789 1.13344 0.00584326 5 123456789 0.968122 0.00575721 6 123456789 0.891813 0.0055967 7 123456789 0.880187 0.00553378 8 123456789 0.886574 0.00549051 9 123456789 0.87715 0.00544364 10 123456789 0.788372 0.00549005 11 123456789 0.786411 0.00536683 12 123456789 0.782886 0.00545892 13 123456789 0.850993 0.00539292 14 123456789 0.732089 0.00536216 15 123456789 0.716228 0.00537486 16 123456789 0.761765 0.00533216 17 123456789 0.748698 0.00531669 18 123456789 0.81643 0.0052688 19 123456789 0.834041 0.00532952 20 123456789 0.719347 0.00532558 21 123456789 0.689878 0.00530547 22 123456789 0.746845 0.00523575 23 123456789 0.71344 0.00533514 24 123456789 0.728547 0.00522594 25 123456789 0.736848 0.00528772 26 123456789 0.707233 0.00526353 27 123456789 0.788937 0.00523797 28 123456789 0.76535 0.00527684 29 123456789 0.781042 0.0052531 30 123456789 0.777492 0.00526724 31 123456789 0.744571 0.00521583 32 123456789 0.719733 0.00524192 33 123456789 0.723337 0.00525541 34 123456789 0.757818 0.00521119 35 123456789 0.715731 0.00522794 36 123456789 0.639827 0.00522746 37 123456789 0.704329 0.00532624 38 123456789 0.734757 0.00522654 39 123456789 0.698371 0.00523943 40 123456789 0.721655 0.0052857 Dimension DIM_NUM = 2 Number of points N = 100 Initial SEED = 123456789 Current SEED = 123456789 INIT = "user". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.721655 CVT ENERGY = 0.0052857 SAMPLE = "user". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 1000 EPSILON (unit roundoff) = 2.22045e-16 TEST14 Generate a CVT in the interval [0,1] using 10 points. Step SEED L2-Change Energy 0 123456789 1 1361431000 0.160985 0.00153477 2 2113797357 0.0445786 0.00114315 3 774553114 0.0318392 0.00109665 4 1822768971 0.0208107 0.00107914 5 1677901918 0.0229283 0.00105061 6 549564449 0.0230602 0.00105009 7 1471635963 0.0231021 0.00101789 8 1876588457 0.0274455 0.00103153 9 1405830084 0.0191369 0.0010073 10 530013625 0.0209302 0.000989205 11 529581864 0.0183811 0.00101341 12 558967527 0.0164111 0.000964389 13 661330247 0.0145865 0.000981371 14 1098537957 0.0238605 0.000984316 15 594068221 0.0206944 0.000984497 16 945299826 0.0176192 0.000966456 17 1678022087 0.0192007 0.00097132 18 191316281 0.0205366 0.000943693 19 984011586 0.0179808 0.000937142 20 1718535243 0.0117807 0.000934436 21 178038614 0.0194129 0.000946645 22 20200138 0.0184798 0.000931437 23 444984306 0.0186397 0.000931187 24 1744274487 0.0129513 0.000915477 25 1410944919 0.0163432 0.00090916 26 1206153057 0.0097488 0.000918097 27 1904749367 0.0133418 0.000898795 28 828989671 0.0166609 0.000897303 29 597622392 0.010223 0.000897906 30 1974874778 0.0128766 0.000906444 31 1965902505 0.0105821 0.000889443 32 1480364626 0.0118928 0.000889515 33 711829075 0.00947776 0.000896629 34 1737841956 0.0106194 0.00089578 35 603154755 0.0136249 0.000880741 36 802612054 0.0112724 0.000869357 37 2063967593 0.0129428 0.000877656 38 1694402813 0.00942187 0.000878192 39 2097128917 0.00845923 0.000866691 40 799277902 0.00789928 0.000880717 Dimension DIM_NUM = 1 Number of points N = 10 Initial SEED = 123456789 Current SEED = 1443447695 INIT = "uniform". Max iterations IT_MAX = 40 IT_FIXED (fixed samples) = 1 Iterations IT_NUM = 40 Difference IT_DIFF = 0.00789928 CVT ENERGY = 0.000880717 SAMPLE = "uniform". Samples SAMPLE_NUM = 10000 Sampling BATCH size = 10000 EPSILON (unit roundoff) = 2.22045e-16 Generators (rows): Row: 1 Col 1 0.299144 2 0.942691 3 0.823978 4 0.596673 5 0.491282 6 0.122762 7 0.392245 8 0.209466 9 0.0412852 10 0.708832 CVT_PRB Normal end of execution. 19 December 2011 12:12:53 PM