@@ -9,11 +9,11 @@ import Base.Broadcast: BroadcastStyle, Broadcasted, broadcasted
9
9
10
10
import ArrayLayouts: colsupport, rowsupport, triangularlayout, MatLdivVec, triangulardata, TriangularLayout, TridiagonalLayout,
11
11
sublayout, _qr, __qr, MatLmulVec, MatLmulMat, AbstractQLayout, materialize!, diagonaldata, subdiagonaldata, supdiagonaldata,
12
- _bidiag_forwardsub!, mulreduce
12
+ _bidiag_forwardsub!, mulreduce, RangeCumsum
13
13
import BandedMatrices: BandedMatrix, _BandedMatrix, AbstractBandedMatrix, bandeddata, bandwidths, BandedColumns, bandedcolumns,
14
14
_default_banded_broadcast, banded_similar
15
15
import FillArrays: AbstractFill, getindex_value, axes_print_matrix_row
16
- import InfiniteArrays: OneToInf, InfUnitRange, Infinity, InfStepRange, AbstractInfUnitRange, InfAxes
16
+ import InfiniteArrays: OneToInf, InfUnitRange, Infinity, InfStepRange, AbstractInfUnitRange, InfAxes, InfRanges
17
17
import LinearAlgebra: lmul!, ldiv!, matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose
18
18
import LazyArrays: applybroadcaststyle, CachedArray, CachedMatrix, CachedVector, DenseColumnMajor, FillLayout, ApplyMatrix, check_mul_axes, ApplyStyle, LazyArrayApplyStyle, LazyArrayStyle,
19
19
resizedata!, MemoryLayout,
@@ -23,11 +23,11 @@ import LazyArrays: applybroadcaststyle, CachedArray, CachedMatrix, CachedVector,
23
23
import MatrixFactorizations: ul, ul!, _ul, ql, ql!, _ql, QLPackedQ, getL, getR, getU, reflector!, reflectorApply!, QL, QR, QRPackedQ,
24
24
QRPackedQLayout, AdjQRPackedQLayout, QLPackedQLayout, AdjQLPackedQLayout, LayoutQ
25
25
26
- import BlockArrays: AbstractBlockVecOrMat, sizes_from_blocks, _length, BlockedUnitRange, blockcolsupport, BlockLayout, AbstractBlockLayout
26
+ import BlockArrays: AbstractBlockVecOrMat, sizes_from_blocks, _length, BlockedUnitRange, blockcolsupport, BlockLayout, AbstractBlockLayout, BlockSlice
27
27
28
28
import BandedMatrices: BandedMatrix, bandwidths, AbstractBandedLayout, _banded_qr!, _banded_qr, _BandedMatrix
29
29
30
- import LazyBandedMatrices: ApplyBandedLayout, BroadcastBandedLayout, _krontrav_axes
30
+ import LazyBandedMatrices: ApplyBandedLayout, BroadcastBandedLayout, _krontrav_axes, _block_interlace_axes
31
31
32
32
import BlockBandedMatrices: _BlockSkylineMatrix, _BandedMatrix, _BlockSkylineMatrix, blockstart, blockstride,
33
33
BlockSkylineSizes, BlockSkylineMatrix, BlockBandedMatrix, _BlockBandedMatrix, BlockTridiagonal,
@@ -38,7 +38,7 @@ import SemiseparableMatrices: AbstractAlmostBandedLayout, _almostbanded_qr!
38
38
39
39
# BroadcastStyle(::Type{<:BandedMatrix{<:Any,<:Any,<:OneToInf}}) = LazyArrayStyle{2}()
40
40
41
- function ^ (A :: BandedMatrix{T,<:Any,<:OneToInf } , p:: Integer ) where T
41
+ function ArrayLayouts . _power_by_squaring (_, :: NTuple{2,Infinity} , A :: AbstractMatrix{T } , p:: Integer ) where T
42
42
if p < 0
43
43
inv (A)^ (- p)
44
44
elseif p == 0
@@ -61,38 +61,5 @@ include("infql.jl")
61
61
include (" infqr.jl" )
62
62
include (" inful.jl" )
63
63
64
- # ######
65
- # block broadcasted
66
- # #####
67
-
68
- const CumsumOneToInf2 = Cumsum{<: Any ,1 ,<: OneToInf }
69
- BlockArrays. sortedunion (a:: CumsumOneToInf2 , :: CumsumOneToInf2 ) = a
70
-
71
- function BlockArrays. sortedunion (a:: Vcat{Int,1,<:Tuple{<:AbstractVector{Int},InfStepRange{Int,Int}}} ,
72
- b:: Vcat{Int,1,<:Tuple{<:AbstractVector{Int},InfStepRange{Int,Int}}} )
73
- @assert a == b
74
- a
75
- end
76
-
77
-
78
- map (:: typeof (length), A:: BroadcastArray{OneTo{Int},1,Type{OneTo}} ) = A. args[1 ]
79
- map (:: typeof (length), A:: BroadcastArray{<:Fill,1,Type{Fill}} ) = A. args[2 ]
80
- map (:: typeof (length), A:: BroadcastArray{<:Zeros,1,Type{Zeros}} ) = A. args[1 ]
81
- map (:: typeof (length), A:: BroadcastArray{<:Vcat,1,Type{Vcat}} ) = broadcast (+ ,map .(length,A. args)... )
82
- broadcasted (:: LazyArrayStyle{1} , :: typeof (length), A:: BroadcastArray{OneTo{Int},1,Type{OneTo}} ) =
83
- A. args[1 ]
84
- broadcasted (:: LazyArrayStyle{1} , :: typeof (length), A:: BroadcastArray{<:Fill,1,Type{Fill}} ) =
85
- A. args[2 ]
86
-
87
- BlockArrays. _length (:: BlockedUnitRange , :: OneToInf ) = ∞
88
- BlockArrays. _last (:: BlockedUnitRange , :: OneToInf ) = ∞
89
-
90
- # ##
91
- # KronTrav
92
- # ##
93
-
94
- _krontrav_axes (A:: NTuple{N,OneToInf{Int}} , B:: NTuple{N,OneToInf{Int}} ) where N =
95
- @. blockedrange (OneTo (length (A)))
96
-
97
64
98
65
end # module
0 commit comments