1
1
module ContinuumArrays
2
2
using IntervalSets, DomainSets, LinearAlgebra, LazyArrays, FillArrays, BandedMatrices, QuasiArrays, Infinities, InfiniteArrays, StaticArrays, BlockArrays, RecipesBase
3
3
import Base: @_inline_meta , @_propagate_inbounds_meta , axes, size, getindex, convert, prod, * , / , \ , + , - , == , ^ ,
4
- IndexStyle, IndexLinear, == , OneTo, _maybetail, tail, similar, copyto!, copy, diff,
4
+ IndexStyle, IndexLinear, == , OneTo, tail, similar, copyto!, copy, diff,
5
5
first, last, show, isempty, findfirst, findlast, findall, Slice, union, minimum, maximum, sum, _sum,
6
6
getproperty, isone, iszero, zero, abs, < , ≤ , > , ≥ , string, summary, to_indices, view
7
7
import Base. Broadcast: materialize, BroadcastStyle, broadcasted, Broadcasted
@@ -17,7 +17,7 @@ import ArrayLayouts: mul, ZerosLayout, ScalarLayout, AbstractStridedLayout
17
17
import QuasiArrays: cardinality, checkindex, QuasiAdjoint, QuasiTranspose, Inclusion, SubQuasiArray,
18
18
QuasiDiagonal, MulQuasiArray, MulQuasiMatrix, MulQuasiVector, QuasiMatMulMat, QuasiArrayLayout,
19
19
ApplyQuasiArray, ApplyQuasiMatrix, LazyQuasiArrayApplyStyle, AbstractQuasiArrayApplyStyle, AbstractQuasiLazyLayout,
20
- LazyQuasiArray, LazyQuasiVector, LazyQuasiMatrix, LazyLayout, LazyQuasiArrayStyle, _factorize,
20
+ LazyQuasiArray, LazyQuasiVector, LazyQuasiMatrix, LazyLayout, LazyQuasiArrayStyle, _factorize, _cutdim,
21
21
AbstractQuasiFill, UnionDomain, __sum, _cumsum, __cumsum, applylayout, _equals, layout_broadcasted, PolynomialLayout
22
22
import InfiniteArrays: Infinity, InfAxes
23
23
import AbstractFFTs: Plan
@@ -74,15 +74,15 @@ function BlockArrays.blockaxes(A::AbstractQuasiArray{T,N}, d) where {T,N}
74
74
end
75
75
76
76
@inline to_indices (A:: AbstractQuasiArray , inds, I:: Tuple{Block{1}, Vararg{Any}} ) =
77
- (unblock (A, inds, I), to_indices (A, _maybetail (inds), tail (I))... )
77
+ (unblock (A, inds, I), to_indices (A, _cutdim (inds, I[ 1 ] ), tail (I))... )
78
78
@inline to_indices (A:: AbstractQuasiArray , inds, I:: Tuple{BlockRange{1,R}, Vararg{Any}} ) where R =
79
- (unblock (A, inds, I), to_indices (A, _maybetail (inds), tail (I))... )
79
+ (unblock (A, inds, I), to_indices (A, _cutdim (inds, I[ 1 ] ), tail (I))... )
80
80
@inline to_indices (A:: AbstractQuasiArray , inds, I:: Tuple{BlockIndex{1}, Vararg{Any}} ) =
81
- (inds[1 ][I[1 ]], to_indices (A, _maybetail (inds), tail (I))... )
81
+ (inds[1 ][I[1 ]], to_indices (A, _cutdim (inds, I[ 1 ] ), tail (I))... )
82
82
@inline to_indices (A:: AbstractQuasiArray , I:: Tuple{BlockRange, Vararg{Any}} ) = to_indices (A, axes (A), I)
83
83
84
84
@inline to_indices (A:: AbstractQuasiArray , inds, I:: Tuple{AbstractArray{<:BlockIndex{1}}, Vararg{Any}} ) =
85
- (inds[1 ][I[1 ]], to_indices (A, _maybetail (inds), tail (I))... )
85
+ (inds[1 ][I[1 ]], to_indices (A, _cutdim (inds, I[ 1 ] ), tail (I))... )
86
86
87
87
checkpoints (x:: Number ) = x
88
88
checkpoints (d:: AbstractInterval{T} ) where T = width (d) .* SVector {3,float(T)} (0.823972 ,0.01 ,0.3273484 ) .+ leftendpoint (d)
0 commit comments