Example: Create an empty delta graph ```python dg = DeltaGraph() ``` Create delta graph with some initial nodes from monomials. Fills a dictionary with nodes of all given initial nodes. ![]() ![]() """ def _init_ ( self, * init_nodes : Optional ], degree : int = 3 ): """Creates a Delta Graph. Example: ``` ↓ n1 = ( (0,1), (0,2), (0,3), (0,4) ) n2 = ( (0,1), (0,2), (1,3), (0,4) ) ``` in our graph will have: ``` n1 n2 ``` or ```python size = 4 ↓ graph_dict = 3 ``` The graph is symmetric: ```python graph_dict = 3 ``` This representation will help us simplify the evaluation by removing redundant/irrelevant choices/paths. We use tuple because we want them to be hashable (as key in dictionary). Weight of edge represents the index where the nodes differ. We will often refer to tuple of deltas as simple node, but a node with length! Nodes are "sorted" by this length in order to be compared by chunks of same size.
0 Comments
Leave a Reply. |