generated from AlgebraicJulia/AlgebraicTemplate.jl
-
Notifications
You must be signed in to change notification settings - Fork 8
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
multicolumn indexing #74
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
==========================================
- Coverage 91.70% 86.62% -5.08%
==========================================
Files 17 18 +1
Lines 1362 1443 +81
==========================================
+ Hits 1249 1250 +1
- Misses 113 193 +80
☔ View full report in Codecov by Sentry. |
Closing, as I haven't had time to keep pursuing it, and AlgebraicJulia/GATlab.jl#135 seems like the glorious future for acset like data structures. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I'm opening a draft PR for features to address #17. There's some junk/temporary files that I was using to test things with that are in this PR, but the relevant "proof of concept" code is in https://github.com/slwu89/ACSets.jl/blob/multicol-index/src/MultiColIndex.jl and https://github.com/slwu89/ACSets.jl/blob/multicol-index/test/MultiColIndex.jl contains some bare minimum examples that things are working with one indexed product, and one an indexed multi-relation.
On the dev meeting, it was suggested by @epatters that a good way to incorporate the new data structures would be to wrap the acset in another structure that contained information needed for indexing. This draft creates a new type
IndexedSpanACSet
which stores what I am calling "indexed spans", that is, (multi)spans that we want to generate a preimage cache for, and also stores those preimage caches. The indexed spans are stored in the type, as eventually I think we'll want to move as much of the search logic as possible to be done at compile time, but for now all of that logic is done at runtime.incident
is overloaded for the new type, and either looks up the key in the cache if that combination of homs is indexed, or does a simple runtime search if not.In order to nicely integrate this feature with existing ACSet machinery, it seems that modifications to at least 4 methods are needed. If parts are added or removed to the legs of any indexed span, the keys of the preimage caches need to be updated, so
add_part!
andrem_part!
are overloaded. On a second glance at the source, it seems thatadd_part!
actually just callsadd_parts!
with a single argument, so it seems that the overload should be for the plural method. The other two areset_subpart!
orclear_subpart!
, which need to update values associated with keys when subparts are modified that are involved in an indexed span(s). I believe that overloading these 4 methods, and forwarding the rest of the methods in the acset interface to the underlying acset within theIndexedSpanACSet
should be sufficient to get everything working, but this is one of many places I'm looking for some guidance.There are many remaining questions besides obvious ones related to eventually getting this PR ready for review. One of them is how (assuming we want to) to allow multicolumn indexing to work where some of the
parts
inincident
may be attributes, and we want to index backwards along some chain of attrs/homs until we get to the apex part(s) corresponding to them.Tagging @kris-brown here as he gave me great help on my last PR, but happy to hear comments from others.