Skip to content

Commit

Permalink
Move out BandedMatrices code
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Nov 27, 2024
1 parent 73df745 commit 5eea2fb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 778 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "InfiniteLinearAlgebra"
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
version = "0.8.5"
version = "0.9"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand All @@ -23,7 +23,7 @@ BandedMatrices = "1.7.2"
BlockArrays = "1.0"
BlockBandedMatrices = "0.13"
FillArrays = "1.0"
InfiniteArrays = "0.14"
InfiniteArrays = "0.15"
InfiniteRandomArrays = "0.2"
Infinities = "0.1"
LazyArrays = "2.0"
Expand Down
30 changes: 3 additions & 27 deletions src/InfiniteLinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,35 +53,11 @@ import MatrixFactorizations: AdjQLPackedQLayout, LayoutQ, QL, QLPackedQ, QLPacke
ul!, ul_layout

import SemiseparableMatrices: AbstractAlmostBandedLayout, _almostbanded_qr!


LinearAlgebra._cut_B(x::AbstractVector, ::InfUnitRange) = x
LinearAlgebra._cut_B(X::AbstractMatrix, ::InfUnitRange) = X


if VERSION v"1.11.0-DEV.21"
using LinearAlgebra: UpperOrLowerTriangular
else
const UpperOrLowerTriangular{T,S} = Union{LinearAlgebra.UpperTriangular{T,S},
LinearAlgebra.UnitUpperTriangular{T,S},
LinearAlgebra.LowerTriangular{T,S},
LinearAlgebra.UnitLowerTriangular{T,S}}
end

import InfiniteArrays: UpperOrLowerTriangular

# BroadcastStyle(::Type{<:BandedMatrix{<:Any,<:Any,<:OneToInf}}) = LazyArrayStyle{2}()

function ArrayLayouts._power_by_squaring(_, ::NTuple{2,InfiniteCardinal{0}}, A::AbstractMatrix{T}, p::Integer) where T
if p < 0
inv(A)^(-p)
elseif p == 0
Eye{T}(∞)
elseif p == 1
copy(A)
else
A*A^(p-1)
end
end


function choplength(c::AbstractVector, tol)
@inbounds for k = length(c):-1:1
Expand Down Expand Up @@ -128,7 +104,7 @@ pad(c::Transpose, ax, bx) = transpose(pad(parent(c), bx, ax))
pad(c::Adjoint, ax, bx) = adjoint(pad(parent(c), bx, ax))
pad(c::BlockVec, ax::BlockedOneTo{Int,<:InfStepRange}) = BlockVec(pad(c.args[1], size(c.args[1],1), ∞))

export Vcat, Fill, ql, ql!, ∞, ContinuousSpectrumError, BlockTridiagonal
export ∞, ContinuousSpectrumError, BlockTridiagonal

include("banded/hessenbergq.jl")

Expand Down
Loading

0 comments on commit 5eea2fb

Please sign in to comment.