Skip to content

Commit fd26e92

Browse files
committed
changes to consistent and assemble for performance
1 parent 46ae438 commit fd26e92

File tree

2 files changed

+615
-253
lines changed

2 files changed

+615
-253
lines changed

src/jagged_array.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ function JaggedArray{T,Ti}(a::AbstractArray{<:AbstractArray}) where {T,Ti}
154154
JaggedArray(data,ptrs)
155155
end
156156

157+
# New
158+
function jagged_range(a::Union{JaggedArray,GenericJaggedArray},i::Integer)
159+
u = one(eltype(a.ptrs))
160+
pini = a.ptrs[i]
161+
pend = a.ptrs[i+1]-u
162+
pini:pend
163+
end
164+
165+
166+
###########
157167

158168
Base.size(a::Union{JaggedArray,GenericJaggedArray}) = (length(a.ptrs)-1,)
159169
function Base.getindex(a::Union{JaggedArray,GenericJaggedArray},i::Int)

0 commit comments

Comments
 (0)