Inserting and extracting FSAs from Array blocks
Opened this issue · 1 comments
c42f commented
@awbsmith needs something for constructing FSAs from parts of a larger AbstractArray, but without allocating a temporary.
The main issue here is choosing the right name. slice
and sub
are right out due to 0.5 vs 0.4 compatibility. view
seems like the right thing, with exactly the same syntax and semantics as Base.view
in 0.5, but with an extra parameter to specify the output type:
view(Mat{3,3}, A, 1:3,1:3) # produces Mat{3,3,eltype(A)}(A[1:3,1:3])
Symmetrically, we should also have the ability to set blocks in Arrays to a given FSA:
A[1:3,1:3] = eye(Mat{3,3,Float64})
andyferris commented
👍 to using the view(Type, array, indices...)
syntax.