08-Oct-2022 08:24:00 partial_digest_test(): MATLAB/Octave version 4.2.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: 4 2: 27 3: 13 4: 1 5: 1 6: 8 7: 24 8: 14 9: 20 10: 14 Maximum: 27 Output vector: 1: 4 2: 13 3: 1 4: 1 5: 8 6: 24 7: 14 8: 20 9: 14 10: 27 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: 2 3: 9 4: 15 5: 18 6: 20 Distances: 1: 2 2: 2 3: 3 4: 5 5: 6 6: 7 7: 9 8: 9 9: 11 10: 13 11: 15 12: 16 13: 18 14: 18 15: 20 Solution: 1: 0 2: 20 3: 18 4: 2 5: 15 6: 9 Solution: 1: 0 2: 20 3: 18 4: 2 5: 5 6: 11 Solution: 1: 0 2: 20 3: 2 4: 18 5: 15 6: 9 Solution: 1: 0 2: 20 3: 2 4: 18 5: 5 6: 11 partial_digest_test(): Normal end of execution. 08-Oct-2022 08:24:00