Simplify, upgrade, and type-stabilize dom_to_graph #891
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DataMigrations.jl
uses thedom_to_graph
function to convert a category from a presentation to a graph so that it can be fed into theLimits
functionality. At the same time it has to do some typecasting to handle the fact that its diagrams might containing at least three concrete types--SetFunctionCallable
,SetFunctionId
,FinDomFunctionInt
--while also allowing for mutations during the process of populating partially defined diagram and then constructing bipartite graphs for the limit.This PR modifies
dom_to_graph
to ensure that the output will always havedom
aFinCatGraph
,ob_map
a vector ofobtype
, andhom_map
a vector ofhomtype
. There seems to be no reason as yet to allowcodom(F)
to be modified, although maybe there will be such a need someday.Requesting a patch release. In some sense this is a breaking change since the old function wouldn't change a functor with domain other than a
FinCatPresentation
, but I don't have any reason to believe this function's ever been called outside of theDataMigrations.jl
context. And the breaking could only occur if somebody was relying excessively on implementation details of the input functor such as theob_map
being aDict
anyway--this function doesn't change the functor's semantics.