Tue Oct 19 17:10:20 2021 simplex_grid_test(): Python version: 3.6.9 Test simplex_grid(). comp_next_grlex_test Python version: 3.6.9 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. comp_next_grlex determines the next COMP in graded lexicographic (grlex) order. Rank: NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 comp_next_grlex_test: Normal end of execution. comp_random_test Python version: 3.6.9 comp_random generates random compositions. 6 0 1 3 0 1 0 0 2 7 2 3 1 2 2 3 0 2 4 1 6 1 0 0 3 comp_random_test: Normal end of execution. comp_random_grlex_test Python version: 3.6.9 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. comp_random_grlex selects a random COMP in graded lexicographic (grlex) order between indices RANK1 and RANK2. 51: 5 = 3 + 0 + 2 37: 5 = 0 + 1 + 4 40: 5 = 0 + 4 + 1 43: 5 = 1 + 1 + 3 33: 4 = 3 + 0 + 1 comp_random_grlex_test: Normal end of execution. comp_rank_grlex_test Python version: 3.6.9 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. comp_rank_grlex determines the rank of a COMP from its parts. Actual Inferred Test Rank Rank 0 35 35 1 34 34 2 42 42 3 51 51 4 34 34 comp_rank_grlex_test: Normal end of execution. comp_unrank_grlex_test Python version: 3.6.9 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. comp_unrank_grlex determines the parts of a COMP from its rank. Rank: -> NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 comp_unrank_grlex_test: Normal end of execution. ksub_random2_test Python version: 3.6.9 ksub_random2 generates a random K subset of an N set. Set size is N = 5 Subset size is K = 3 1 3 5 2 3 5 1 3 4 1 4 5 1 2 4 2 3 5 1 3 4 2 4 5 1 2 5 1 3 4 ksub_random2_test: Normal end of execution. simplex_grid_count_test: Python version: 3.6.9 simplex_grid_count counts the points in a regular grid with N+1 points on a side, in an M-dimensional simplex. M: 0 1 2 3 4 5 N: 0: 1 1 1 1 1 1 1: 1 2 3 4 5 6 2: 1 3 6 10 15 21 3: 1 4 10 20 35 56 4: 1 5 15 35 70 126 5: 1 6 21 56 126 252 6: 1 7 28 84 210 462 7: 1 8 36 120 330 792 8: 1 9 45 165 495 1287 9: 1 10 55 220 715 2002 10: 1 11 66 286 1001 3003 simplex_grid_count_test: Normal end of execution. simplex_grid_index_next_test: Python version: 3.6.9 simplex_grid_index_next lists, one by one, the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 0: 0 0 0 ( 3) 1: 0 0 1 ( 2) 2: 0 0 2 ( 1) 3: 0 0 3 ( 0) 4: 0 1 0 ( 2) 5: 0 1 1 ( 1) 6: 0 1 2 ( 0) 7: 0 2 0 ( 1) 8: 0 2 1 ( 0) 9: 0 3 0 ( 0) 10: 1 0 0 ( 2) 11: 1 0 1 ( 1) 12: 1 0 2 ( 0) 13: 1 1 0 ( 1) 14: 1 1 1 ( 0) 15: 1 2 0 ( 0) 16: 2 0 0 ( 1) 17: 2 0 1 ( 0) 18: 2 1 0 ( 0) 19: 3 0 0 ( 0) simplex_grid_index_next_test: Normal end of execution. simplex_grid_index_sample_test: Python version: 3.6.9 simplex_grid_index_sample returns a randomly selected index of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 0: 1 0 1 ( 1) 1: 2 0 1 ( 0) 2: 0 3 0 ( 0) 3: 0 2 0 ( 1) 4: 2 0 1 ( 0) 5: 0 0 1 ( 2) 6: 1 2 0 ( 0) 7: 0 0 3 ( 0) 8: 1 1 1 ( 0) 9: 1 1 1 ( 0) 10: 3 0 0 ( 0) 11: 1 2 0 ( 0) 12: 2 1 0 ( 0) 13: 1 0 2 ( 0) 14: 0 2 1 ( 0) 15: 1 1 0 ( 1) 16: 0 1 1 ( 1) 17: 2 0 1 ( 0) 18: 0 2 0 ( 1) 19: 0 2 0 ( 1) simplex_grid_index_sample_test: Normal end of execution. simplex_grid_index_all_test: Python version: 3.6.9 simplex_grid_index_all returns all the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. Simplex Grid Index Matrix: Col: 0 1 2 3 Row 0: 0 0 0 3 1: 0 0 1 2 2: 0 0 2 1 3: 0 0 3 0 4: 0 1 0 2 5: 0 1 1 1 6: 0 1 2 0 7: 0 2 0 1 8: 0 2 1 0 9: 0 3 0 0 10: 1 0 0 2 11: 1 0 1 1 12: 1 0 2 0 13: 1 1 0 1 14: 1 1 1 0 15: 1 2 0 0 16: 2 0 0 1 17: 2 0 1 0 18: 2 1 0 0 19: 3 0 0 0 simplex_grid_index_all_test: Normal end of execution. simplex_grid_index_to_point_test01: Python version: 3.6.9 simplex_grid_index_to_point returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Col: 0 1 Row 0 : 20 0 1 : 30 40 2 : 10 20 Choosing random simplex indices to convert: #: 1 2 3 X Y 0: 1 4 0 28.0000 32.0000 1: 2 3 0 26.0000 24.0000 2: 0 4 1 26.0000 36.0000 3: 2 1 2 18.0000 16.0000 4: 0 0 5 10.0000 20.0000 5: 1 0 4 12.0000 16.0000 6: 2 0 3 14.0000 12.0000 7: 3 0 2 16.0000 8.0000 8: 5 0 0 20.0000 0.0000 9: 4 0 1 18.0000 4.0000 simplex_grid_index_to_point_test01: Normal end of execution. simplex_grid_index_to_point_test02: Python version: 3.6.9 simplex_grid_index_to_point returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Col: 0 1 Row 0 : 20 0 1 : 30 40 2 : 10 20 Grid Point Coordinates: Col: 0 1 Row 0 : 10 20 1 : 14 24 2 : 18 28 3 : 22 32 4 : 26 36 5 : 30 40 6 : 12 16 7 : 16 20 8 : 20 24 9 : 24 28 10 : 28 32 11 : 14 12 12 : 18 16 13 : 22 20 14 : 26 24 15 : 16 8 16 : 20 12 17 : 24 16 18 : 18 4 19 : 22 8 20 : 20 0 simplex_grid_index_to_point_test02: Normal end of execution. simplex_grid_test: Normal end of execution. Tue Oct 19 17:10:20 2021