# Genearte the true derived position list {LB0,IB0}: LB0,IB0 = # Now generate various candidates {LB,IB} and C = # Generate a list {LB1} with # Now generate various lists {LB} with various numbers of # preserved positions: # Generate a list {LB0} of {nB} random positions, with min separation {min-sep}: LB0, IB0 = insert_random_valitions(nB, max_val, min_sep, []) assert len(IB0) == 0 ??? ??? # Select the {nK} indices in {LA} to preserve, and their matches in {LB}: IA = random_index_subset(nK, nA) IB = random_index_subset(nK, nB) # Generate a list {LB1} of {nB} positions from {LA} by the delete-shift-insert method: LB1 = simulate_del_shift_add(nB, IB, LA, IA, max_val, pert_dev) test_sub_sub_match_quality_given_IB_IA(LB, IB, LA, IA, max_val, pert_dev) return # ----------------------------------------------------------------------