@@ -59,10 +59,10 @@ function Base.vcat(x::AbstractComponentVecOrMat, y::AbstractComponentVecOrMat)
5959end
6060Base. vcat (x:: CV... ) where {CV<: AdjOrTransComponentArray } = ComponentArray (reduce (vcat, map (y-> getdata (y. parent)' , x)), getaxes (x[1 ]))
6161Base. vcat (x:: ComponentVector , args... ) = vcat (getdata (x), getdata .(args)... )
62- Base. vcat (x:: ComponentVector , args:: Union{Number, UniformScaling, AbstractVecOrMat} ... ) = vcat (getdata (x), getdata .(args)... )
62+ Base. vcat (x:: ComponentVector , args:: Vararg{ Union{Number, UniformScaling, AbstractVecOrMat}} ) = vcat (getdata (x), getdata .(args)... )
6363Base. vcat (x:: ComponentVector , args:: Vararg{AbstractVector{T}, N} ) where {T,N} = vcat (getdata (x), getdata .(args)... )
6464
65- function Base. hvcat (row_lengths:: NTuple{N,Int} , xs:: AbstractComponentVecOrMat... ) where {N}
65+ function Base. hvcat (row_lengths:: NTuple{N,Int} , xs:: Vararg{ AbstractComponentVecOrMat} ) where {N}
6666 i = 1
6767 idxs = UnitRange{Int}[]
6868 for row_length in row_lengths
@@ -91,28 +91,28 @@ Base.to_index(x::ComponentArray, i) = i
9191
9292# Get ComponentArray index
9393Base. @propagate_inbounds Base. getindex (x:: ComponentArray , idx:: CartesianIndex ) = getdata (x)[idx]
94- Base. @propagate_inbounds Base. getindex (x:: ComponentArray , idx:: FlatIdx... ) = getdata (x)[idx... ]
95- Base. @propagate_inbounds function Base. getindex (x:: ComponentArray , idx:: FlatOrColonIdx... )
94+ Base. @propagate_inbounds Base. getindex (x:: ComponentArray , idx:: Vararg{ FlatIdx} ) = getdata (x)[idx... ]
95+ Base. @propagate_inbounds function Base. getindex (x:: ComponentArray , idx:: Vararg{ FlatOrColonIdx} )
9696 axs = map ((ax, i) -> getindex (ax, i). ax, getaxes (x), idx)
9797 axs = remove_nulls (axs... )
9898 return ComponentArray (getdata (x)[idx... ], axs... )
9999end
100100Base. @propagate_inbounds Base. getindex (x:: ComponentArray , :: Colon ) = getdata (x)[:]
101- Base. @propagate_inbounds Base. getindex (x:: ComponentArray , :: Colon... ) = x
101+ Base. @propagate_inbounds Base. getindex (x:: ComponentArray , :: Colon , :: Vararg{Colon} ) = x
102102@inline Base. getindex (x:: ComponentArray , idx... ) = getindex (x, toval .(idx)... )
103- @inline Base. getindex (x:: ComponentArray , idx:: Val... ) = _getindex (getindex, x, idx... )
103+ @inline Base. getindex (x:: ComponentArray , idx:: Vararg{ Val} ) = _getindex (getindex, x, idx... )
104104
105105# Set ComponentArray index
106106Base. @propagate_inbounds Base. setindex! (x:: ComponentArray , v, idx:: FlatOrColonIdx... ) = setindex! (getdata (x), v, idx... )
107107Base. @propagate_inbounds Base. setindex! (x:: ComponentArray , v, :: Colon ) = setindex! (getdata (x), v, :)
108108@inline Base. setindex! (x:: ComponentArray , v, idx... ) = setindex! (x, v, toval .(idx)... )
109- @inline Base. setindex! (x:: ComponentArray , v, idx:: Val... ) = _setindex! (x, v, idx... )
109+ @inline Base. setindex! (x:: ComponentArray , v, idx:: Vararg{ Val} ) = _setindex! (x, v, idx... )
110110
111111# Explicitly view
112- Base. @propagate_inbounds Base. view (x:: ComponentArray , idx:: ComponentArrays.FlatIdx... ) = view (getdata (x), idx... )
112+ Base. @propagate_inbounds Base. view (x:: ComponentArray , idx:: Vararg{ ComponentArrays.FlatIdx} ) = view (getdata (x), idx... )
113113Base. @propagate_inbounds Base. view (x:: ComponentArray , idx... ) = _getindex (view, x, toval .(idx)... )
114114
115- Base. @propagate_inbounds Base. maybeview (x:: ComponentArray , idx:: ComponentArrays.FlatIdx... ) = Base. maybeview (getdata (x), idx... )
115+ Base. @propagate_inbounds Base. maybeview (x:: ComponentArray , idx:: Vararg{ ComponentArrays.FlatIdx} ) = Base. maybeview (getdata (x), idx... )
116116Base. @propagate_inbounds Base. maybeview (x:: ComponentArray , idx... ) = _getindex (Base. maybeview, x, toval .(idx)... )
117117
118118# Generated get and set index methods to do all of the heavy lifting in the type domain
0 commit comments