AlgebraicJulia / AlgebraicJulia/ACSets.jl
Higher Order Functions on ACSets
- Vorherrschende Sprache
- Julia
- Sterne
- 36
- Forks
- 11
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
We should implement the higher-order functions that are easy to do so on ACSets.
```julia
function map(f::FunctionWrapper{S,T}, data::Symbol, acs::ACSet{CD,AD,Ts})
```
This would return an ACSet where the `Data` type corresponding to `data` in Ts (which should be `S`) is replaced by `T`. I wish there was a way to express this in types, but I'm not sure if it's possible... Best approximation would be
```julia
function map1(f:FunctionWrapper{S,T}, acs::ACSet{CD,AD,Tuple{T}})::ACSet{CD,AD,Tuple{S}}
```
We should also have `filter`, which takes in a function of a "part", and all the parts that return true are copied to a new array, along with some other parts? The categorical semantics of this need to be worked out a bit.
And then `filterMap`, of course
I don't know if any type of `fold` makes sense, but if so, we should have it. At some point, I'm just going to go through a checklist of all the functions in dplyr, and figure out which ones make sense for ACSets.
And then also maybe some sorting functions?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.