-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated code for composites of C-set subparts #9
Comments
@epatters I am working on addressing this (for both julia> datcomp
CompositesData{Symbol} {X:5, Y:4, Z:3, W:3, Zattr:0}
┌───┬───┬───┐
│ X │ f │ h │
├───┼───┼───┤
│ 1 │ 1 │ 1 │
│ 2 │ 2 │ 2 │
│ 3 │ 3 │ 3 │
│ 4 │ 1 │ 1 │
│ 5 │ 2 │ 2 │
└───┴───┴───┘
┌───┬───┐
│ Y │ g │
├───┼───┤
│ 1 │ 3 │
│ 2 │ 2 │
│ 3 │ 1 │
│ 4 │ 3 │
└───┴───┘
┌───┬───────┐
│ Z │ zattr │
├───┼───────┤
│ 1 │ a │
│ 2 │ b │
│ 3 │ c │
└───┴───────┘
julia> parts(datcomp, codom(acset_schema(datcomp), :zattr))
1:0 |
Thanks for working on this, Sean! I am wondering what the intended behavior of, say, |
Ah I was thinking that |
My first reaction to |
@jpfairbanks that makes sense, although I wonder if that would introduce too much complexity into the possible types of outputs from |
I think the composite case should be handled by asking, what would I do with the composite function and then decide how to implement that. I would expect a map from each weight in the image of |
Great! that's what I ended up doing in #109, for composites. Didn't change anything for the single attr (arrow into typeset) case. |
I think this one is good to close since #109 is merged, however @jpfairbanks did bring up the interesting point of what should happen when someone does |
IMO, that should be a separate issue, although you could link the discussion here if helpful. Thanks for closing a longstanding issue with acsets! |
Composites of C-set subparts can be accessed using
Because the list of subparts is a vector, it must be map-reduced at runtime. We should also support a static version, based on tuples, that
@generates
code:Likewise for the function
incident
.This is motivated by AlgebraicJulia/Catlab.jl#371, where composites of length 2 are used often in the implementation of DWDs as ACSets. When this feature is implemented, all the DWD code should be updated accordingly.
The text was updated successfully, but these errors were encountered: