Closed arcondello closed 2 years ago
Today, you can already do the second with a bit of an off-label use of the internal functionality:
from minorminer import busclique
bgc_source = busclique.busgraph_cache(g)
emb0 = bgc_source.largest_clique() #computes a cache
clique_cache = bgc_source._fetch_cache('clique', lambda:()) #retrieves the cached cliques
bgc_target = busclique.busgraph_cache(g)
bgc_target._fetch_cache('clique', lambda: bgc_target) #injects the cached cliques to the new busgraph_cache object
emb1 = bgc_target.largest_clique()
assert emb0 == emb1
I imagine something like
though not sure we can insert only one clique embedding. In which case something like