234
234
the colorize dictionary (produced by the colorize routine)
235
235
associated to diagram with index index. Keep track of simplification
236
236
results for maximal optimization."""
238
238
# loop over possible color chains
239
239
for col_chain, col_str in colorize_dict.items():
240
240
# Create a canonical immutable representation of the the string
241
241
canonical_rep, rep_dict = col_str.to_canonical()
244
243
# If this representation has already been considered,
246
245
col_fact = self._canonical_dict[canonical_rep].create_copy()
248
247
# If the representation is really new