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
Add a method to the Graph() object that allows adding other graphs.
for g and h both Graph() objects, g.add_graph(h) should return a graph containing the union of the nodes in g and h, and the sum of the edges. You should decide whether we want to 1) add new distinct edges, or 2) simply increase the weight of existing edges when we implement this.
the method should return an error if there exists a node in both g and h with the same name, but different and conflicting attributes (e.g. different edges connecting the same nodes are okay, but different user-defined internal properties are bad. we might need to discuss how to implement this).
The text was updated successfully, but these errors were encountered:
If the method A.add_graph(B), if there exists a node in B not in A it will be created in the resultant graph. If there exists a node in A not in B it will remain in the resultant graph. If there exists a node in B also in A, the resultant graph will contain that node from B
Add a method to the Graph() object that allows adding other graphs.
for g and h both Graph() objects, g.add_graph(h) should return a graph containing the union of the nodes in g and h, and the sum of the edges. You should decide whether we want to 1) add new distinct edges, or 2) simply increase the weight of existing edges when we implement this.
the method should return an error if there exists a node in both g and h with the same name, but different and conflicting attributes (e.g. different edges connecting the same nodes are okay, but different user-defined internal properties are bad. we might need to discuss how to implement this).
The text was updated successfully, but these errors were encountered: