I would like to do something like:
type Vecs{V,T}
A::V{T}
B::V{T}
end
where V could be Vector or SharedVector or some other specified AbstractVector and T is some sort of bits-type. I understand that I could type this in the following way:
type Vecs{T}
A::AbstractVector{T}
B::AbstractVector{T}
end
However, I suspect that this loses some efficiency by specifying only AbstractVector rather than SharedVector or Vector.
Alternatively, I could use:
type Vecs{T}
A::T
B::T
end
where T could take on things like Vector{Int64} or SharedVector{Float64}, etc., however this seems extremely inelegant.
Any suggestions? Is there something obvious Iām missing? Thank you!