You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some Graph properties are hard to compute but not always needed, like perfect_matchings. Therefore, we initialize them with a default string which says: This property is not ready, rungetPerfectMatchings.
This nooby trick, which is also used in state_catalog and norm, should be replace by this suggestion from Matthias:
class Graph:
def __init__(self):
self._state_catalog = None
@property
def state_catalog(self):
if self._state_catalog is None:
self._compute_state_catalog()
return self._state_catalog
def _compute_state_catalog(self):
# Lengthy calculation here, setting self._state_catalog
The text was updated successfully, but these errors were encountered:
Some
Graph
properties are hard to compute but not always needed, likeperfect_matchings
. Therefore, we initialize them with a default string which says: This property is not ready, rungetPerfectMatchings
.This nooby trick, which is also used in
state_catalog
andnorm
, should be replace by this suggestion from Matthias:The text was updated successfully, but these errors were encountered: