-
Notifications
You must be signed in to change notification settings - Fork 55
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
ACSet Refactor #489
Comments
I believe we do have indexing for both |
Oh, awesome! |
Anyway, I like the idea of this design! |
I like this refactor too. I think pushing more responsibility onto the FinFunctions makes sense and we should keep an eye to alternative semantics while you design this. Doing C-Markov or C-Poset should be able to reuse a lot of the schema handling code. If we build more of the ACSet code on top of clearer expectations about what interface the components have to provide, then we might be able to get started on what part of the ACSet implementation is semantics independent. |
At its core, an acset is just
I think that we should embrace this simplicity, and move to a struct acset that has two fields:
parts
: a named tuple indexed on objects that gives aFinSet
for each objectsubparts
: a named tuple indexed on morphisms that gives aFinDomFunction
for each morphism. I don't know if we have this forFinDomFunctions
, but we should have indexing happening at the morphism level, instead of at the acset level; there should be an interface for morphisms that allows mutating them, and then morphisms that are indexed will handle their own indexing. This should not affect performance too much, and it will be hugely simpler to implement.As optimizations, we may want to use something slightly different than the existing
FinDomFunctio
n, which stores its domain and codomain, because we already store the domain and codomain somewhere else, but the basic idea still holds.At declaration time (i.e.
@acset_type
) one can choose the concrete types of eachFinDomFunction
for each morphism as well as the concrete types of eachFinSet
for each object.This refactor will probably only affect
CSetDataStructures
, and will not result in the breakage of any external interfaces.Benefits will include:
FinDomFunctions
that have as backing storage CUDAArrays, or similaryFinSet
of symbols, or perhaps aFinSet
of tuples of symbols, etc. Additionally, limits will be delegated to the FinSet level: if we say that the product of twoFinSet
s of symbols is aFinSet
of pairs of symbols, this will be automatically propagated to the acset level.FinDomFunction
s, which can be tuned easily.The text was updated successfully, but these errors were encountered: