08-Jan-2022 08:46:17 partial_digest_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test partial_digest() FIND_DISTANCES_TEST: FIND_DISTANCES takes a candidate location Y and determines whether its distance to each point in the X array is listed in the L array. Initial L array: 1: 13 2: 15 3: 38 4: 90 5: 2 6: 25 7: 77 8: 23 9: 75 10: 52 Consider Y = 77 This Y is acceptable. New X array: 1: 0 2: 90 3: 77 New L array: 1: 52 2: 15 3: 2 4: 25 5: 38 6: 23 7: 75 Consider Y = 35 This Y is not acceptable. I4VEC_MAX_LAST_TEST I4VEC_MAX_LAST identifies the largest element in an I4VEC, and moves it to the final entry. Input vector: 1: 25 2: 28 3: 4 4: 28 5: 19 6: 3 7: 9 8: 17 9: 29 10: 29 Maximum: 29 Output vector: 1: 25 2: 4 3: 28 4: 19 5: 3 6: 9 7: 17 8: 28 9: 29 10: 29 I4VEC_PRINT_TEST I4VEC_PRINT prints an I4VEC The I4VEC: 1: 91 2: 92 3: 93 4: 94 PARTIAL_DIGEST_RECUR_TEST01 PARTIAL_DIGEST_RECUR generates solutions to the partial digest problem, using recursion. The number of objects to place is N = 5 The original placement was 0,3,6,8,10. These placements generate the following distances: Distance array: 1: 2 2: 2 3: 3 4: 3 5: 4 6: 5 7: 6 8: 7 9: 8 10: 10 PARTIAL_DIGEST_RECUR may recover the original placements from the pairwise distances. It may also find other placements that have the same distance array. Solution: 1: 0 2: 10 3: 8 4: 3 5: 6 Solution: 1: 0 2: 10 3: 2 4: 7 5: 4 partial_digest_recur_test02(): partial_digest_recur() generates solutions to the partial digest problem, using recursion test_partial_digest() creates test problems for the partial digest problem. Number of nodes = 6 Maximum distance = 20 Locations: 1: 0 2: 4 3: 8 4: 12 5: 16 6: 20 Distances: 1: 4 2: 4 3: 4 4: 4 5: 4 6: 8 7: 8 8: 8 9: 8 10: 12 11: 12 12: 12 13: 16 14: 16 15: 20 Solution: 1: 0 2: 20 3: 16 4: 4 5: 12 6: 8 Solution: 1: 0 2: 20 3: 16 4: 4 5: 8 6: 12 Solution: 1: 0 2: 20 3: 4 4: 16 5: 12 6: 8 Solution: 1: 0 2: 20 3: 4 4: 16 5: 8 6: 12 partial_digest_recur_test02(): Normal end of execution. partial_digest_test(): Normal end of execution. 08-Jan-2022 08:46:17