Skip to content
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

Better handling of Decorated type #237

Open
jpfairbanks opened this issue Nov 25, 2019 · 0 comments
Open

Better handling of Decorated type #237

jpfairbanks opened this issue Nov 25, 2019 · 0 comments

Comments

@jpfairbanks
Copy link
Owner

As we move to treating multiply decorated cospans like a vector of AbstractModels, we might want to consider refactoring it into a subtype of AbstractVector.

In this case a Decorated is like an AbstractVector of Models that also has dom,codom
we could do Decorated <: AbstractVector{AbstractModel} and then a lot of other Base functionality would come, like map, filter, broadcasting...
we just have to overload getindex(d::Decorated, i::Int), set_index!(d, i, val::AbstractModel) and a few other things. https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-array-1.

I'd also like the ability to represent singly Decorated cospans without the overhead of a singleton array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant