Closed jpfairbanks closed 1 year ago
There are subtle reasons why it's more complicated to turn this into an iterator (related to the fact that there can be distinct subobjects with isomorphic domains, so there's not a one-to-one correspondence of outputs of Subobjectiterator and the overlap iterator) but this is being addressed in https://github.com/AlgebraicJulia/Catlab.jl/pull/821
Resolved by #821.
@kris-brown, the maximum common c-set code is too slow for practical use, and I was trying to hunt down the problem with @p-stokes. It looks like this function was intended to be an iterator, but is actually realizing the whole collection.
https://github.com/AlgebraicJulia/Catlab.jl/blob/58e407be7e3a6186d53805c38a82c6b851a75d9a/src/categorical_algebra/CSets.jl#L1749
Shouldn't this code be something like
This will cause
overlap_maps
to instantly return a generator of the overlaps (as a sequence of pairs) rather than as anOrderedDict
. Then when the MCA code iterates over that collection, it won't have to fully realize the collection before processing it?