@@ -31,7 +31,8 @@ Base.IndexStyle(::Type{<:Vcat{T,1}}) where T = Base.IndexLinear()
31
31
Base. IndexStyle (:: Type{<:Vcat{T,2}} ) where T = Base. IndexCartesian ()
32
32
33
33
34
- @propagate_inbounds @inline function getindex (f:: Vcat{T,1} , k:: Integer ) where T
34
+ @propagate_inbounds @inline function vcat_getindex (f, k:: Integer )
35
+ T = eltype (f)
35
36
κ = k
36
37
for A in f. args
37
38
n = length (A)
@@ -41,7 +42,8 @@ Base.IndexStyle(::Type{<:Vcat{T,2}}) where T = Base.IndexCartesian()
41
42
throw (BoundsError (f, k))
42
43
end
43
44
44
- @propagate_inbounds @inline function getindex (f:: Vcat{T,2} , k:: Integer , j:: Integer ) where T
45
+ @propagate_inbounds @inline function vcat_getindex (f, k:: Integer , j:: Integer )
46
+ T = eltype (f)
45
47
κ = k
46
48
for A in f. args
47
49
n = size (A,1 )
51
53
throw (BoundsError (f, (k,j)))
52
54
end
53
55
56
+ @propagate_inbounds @inline getindex (f:: Vcat{<:Any,1} , k:: Integer ) = vcat_getindex (f, k)
57
+ @propagate_inbounds @inline getindex (f:: Vcat{<:Any,2} , k:: Integer , j:: Integer ) = vcat_getindex (f, k, j)
58
+ getindex (f:: Applied{DefaultArrayApplyStyle,typeof(vcat)} , k:: Integer )= vcat_getindex (f, k)
59
+ getindex (f:: Applied{DefaultArrayApplyStyle,typeof(vcat)} , k:: Integer , j:: Integer )= vcat_getindex (f, k, j)
60
+
54
61
@propagate_inbounds @inline function setindex! (f:: Vcat{T,1} , v, k:: Integer ) where T
55
62
κ = k
56
63
for A in f. args
0 commit comments