rsr.rsr.update_refs¶
- rsr.rsr.update_refs(min_comps_st, refs_dict, refs_mat, row_names, verbose=False)[source]¶
Insert a new reference into the store, removing any it dominates.
Converts
min_comps_stto a reference matrix, checks whether it is already a subset of any existing reference (in which case nothing is updated), and otherwise removes existing references that are subsets of the new one before appending it.- Parameters:
min_comps_st – Minimised component-state dictionary representing the new reference.
refs_dict – Current list of reference dictionaries.
refs_mat – Current reference tensor of shape
(n_refs, n_var, n_state).row_names – Component names matching the rows of
refs_mat.verbose – If True, print a note when the new reference is dominated or when existing references are removed.
- Returns:
A tuple
(refs_dict, refs_mat)updated in place-equivalent form.