Skip to content

Commit 5cda2be

Browse files
committed
move ConstRows
1 parent 6c4de6e commit 5cda2be

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

ext/InfiniteArraysBandedMatricesExt.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using InfiniteArrays.LazyArrays, InfiniteArrays.ArrayLayouts, InfiniteArrays.Fil
44

55
import Base: BroadcastStyle, size, getindex, similar, copy, *, +, -, /, \, materialize!, copyto!, OneTo
66
import Base.Broadcast: Broadcasted
7-
import InfiniteArrays: InfIndexRanges, Infinity, PosInfinity, OneToInf, InfAxes, AbstractInfUnitRange, InfRanges, InfBaseToeplitzLayouts, ConstRowMatrix, PertConstRowMatrix, SymTriPertToeplitz, TriPertToeplitz
7+
import InfiniteArrays: InfIndexRanges, Infinity, PosInfinity, OneToInf, InfAxes, AbstractInfUnitRange, InfRanges, InfBaseToeplitzLayouts, ConstRowMatrix, PertConstRowMatrix, SymTriPertToeplitz, TriPertToeplitz, ConstRows, PertConstRows
88
import ArrayLayouts: sub_materialize, MemoryLayout, sublayout, mulreduce, triangularlayout, MatLdivVec, subdiagonaldata, diagonaldata, supdiagonaldata
99
import LazyArrays: applybroadcaststyle, applylayout, islazy, islazy_layout, simplifiable, AbstractLazyLayout, PaddedColumns, LazyArrayStyle, ApplyLayout, AbstractLazyBandedLayout, ApplyBandedLayout, BroadcastBandedLayout
1010
import BandedMatrices: _BandedMatrix, AbstractBandedMatrix, banded_similar, BandedMatrix, bandedcolumns, BandedColumns, bandeddata
@@ -288,10 +288,6 @@ ConstRowMatrix(A::AbstractMatrix{T}) where T = ApplyMatrix(*, A[:,1], Ones{T}(1,
288288
PertConstRowMatrix(A::AbstractMatrix{T}) where T =
289289
Hcat(_pertdata(A), ApplyMatrix(*, _constrows(A), Ones{T}(1,size(A,2))))
290290

291-
struct ConstRows <: AbstractLazyLayout end
292-
struct PertConstRows <: AbstractLazyLayout end
293-
MemoryLayout(::Type{<:ConstRowMatrix}) = ConstRows()
294-
MemoryLayout(::Type{<:PertConstRowMatrix}) = PertConstRows()
295291
bandedcolumns(::ConstRows) = BandedToeplitzLayout()
296292
bandedcolumns(::PertConstRows) = PertToeplitzLayout()
297293
sublayout(::ConstRows, inds...) = sublayout(ApplyLayout{typeof(*)}(), inds...)

src/InfiniteArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import FillArrays: AbstractFill, Eye, Fill, Ones, RectDiagonal, Zeros, fill_resh
3636

3737
import Infinities: InfiniteCardinal, Infinity, ∞
3838

39-
import LazyArrays: AbstractCachedVector, ApplyLayout, CachedArray, CachedVector, InvColumnLayout, AbstractLazyBandedLayout,
39+
import LazyArrays: AbstractLazyLayout, AbstractCachedVector, ApplyLayout, CachedArray, CachedVector, InvColumnLayout, AbstractLazyBandedLayout,
4040
LazyArrayStyle, LazyLayout, LazyMatrix, PaddedColumns, _padded_sub_materialize, sub_paddeddata,
4141
ApplyBandedLayout, BroadcastBandedLayout
4242

src/inftoeplitz.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
const ConstRowMatrix{T} = ApplyMatrix{T,typeof(*),<:Tuple{<:AbstractVector,<:AbstractFillMatrix{<:Any,Tuple{OneTo{Int},OneToInf{Int}}}}}
22
const PertConstRowMatrix{T} = Hcat{T,<:Tuple{Array{T},<:ConstRowMatrix{T}}}
3+
4+
struct ConstRows <: AbstractLazyLayout end
5+
struct PertConstRows <: AbstractLazyLayout end
6+
MemoryLayout(::Type{<:ConstRowMatrix}) = ConstRows()
7+
MemoryLayout(::Type{<:PertConstRowMatrix}) = PertConstRows()
8+
9+
310
const TriToeplitz{T} = Tridiagonal{T,Fill{T,1,Tuple{OneToInf{Int}}}}
411

512
const SymTriPertToeplitz{T} = SymTridiagonal{T,Vcat{T,1,Tuple{Vector{T},Fill{T,1,Tuple{OneToInf{Int}}}}}}

0 commit comments

Comments
 (0)