The simple solution of testing equality of subnodes and edges is fragile (nodes may not be in same order) and does not terminate for recursive hypernodes.
Comparing the storeStrings is also fragile because the order of nodes may change.
Full graph isomorphism may be too expensive (though comparing properties may help to reduce costs).
Graph isomorphism has unknown complexity, worse than NP, so we need an easy solution.
If we can guarantee a consistent order for reachable nodes, we could traverse them and check if they establish an isomporhism. (Checking an isomorphism is cheaper than finding one!)
But reachableNodes currently creates an identitySet. If we use an OrderedCollection instead, we must take care because reachableNodes uses includes:, which in turn uses =. We must avoid an infinite recursion.
To be fixed:
Hypernode>>#=
The simple solution of testing equality of subnodes and edges is fragile (nodes may not be in same order) and does not terminate for recursive hypernodes. Comparing the storeStrings is also fragile because the order of nodes may change. Full graph isomorphism may be too expensive (though comparing properties may help to reduce costs).
Graph isomorphism has unknown complexity, worse than NP, so we need an easy solution. If we can guarantee a consistent order for reachable nodes, we could traverse them and check if they establish an isomporhism. (Checking an isomorphism is cheaper than finding one!)
But reachableNodes currently creates an identitySet. If we use an OrderedCollection instead, we must take care because reachableNodes uses includes:, which in turn uses =. We must avoid an infinite recursion.