ComponentArrays.jl
ComponentArrays.jl copied to clipboard
Dispatchable ComponentArrays
It would be nice to dispatch on ComponentArrays. Unfortunately, the type of the ComponentArray
is pretty coupled with the size of its components. For example, it's reasonable to want these two to have the same dispatchable type:
x1 = ComponentArray(a=rand(1))
x2 = ComponentArray(a=rand(4))
This will require some reconfiguring of the AbstractAxis
stuff. I think some metadata is going to have to be stored in the AbstractAxis
types rather than the ComponentArray
type. I'll have to give this some thought.
Thank you for opening the issue! My initial use case required using a ComponentArray as a struct containing the parameters of a stochastic model. I wanted to maximize its likelihood, and write a generic MLE algorithm with autodiff, whose logpdf
function would then dispatch onto the model type.