Skip to content

Commit 07170c7

Browse files
authored
Fix diagblockshift with cachedvector (Fixes bug in SingularIntegralEquations.jl) (#71)
1 parent ffad968 commit 07170c7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.4.3"
3+
version = "0.4.4"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/ApproxFunBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import BlockBandedMatrices: blockbandwidth, blockbandwidths, blockcolstop, block
7171
isblockbanded, isbandedblockbanded, bb_numentries, BlockBandedSizes
7272

7373
import FillArrays: AbstractFill, getindex_value
74-
import LazyArrays: cache
74+
import LazyArrays: cache, CachedVector, cacheddata
7575
import InfiniteArrays: PosInfinity, InfRanges, AbstractInfUnitRange, OneToInf, InfiniteCardinal
7676

7777

src/Caching/blockbanded.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ function diagblockshift(a::Vcat{Int,1,<:Tuple{V1,<:AbstractFill{Int}}},
6262
return 1+diagblockshift(Vcat(a.args[1][2:end],a.args[2]),Vcat([b1-a1;b.args[1][2:end]],b.args[2]))
6363
end
6464

65+
_cache2vcat(a) = Vcat(cacheddata(a), a.array)
66+
diagblockshift(a::CachedVector{Int,Vector{Int},<:AbstractFill}, b) = diagblockshift(_cache2vcat(a), b)
67+
diagblockshift(a, b::CachedVector{Int,Vector{Int},<:AbstractFill}) = diagblockshift(a, _cache2vcat(b))
68+
diagblockshift(a::CachedVector{Int,Vector{Int},<:AbstractFill}, b::CachedVector{Int,Vector{Int},<:AbstractFill}) = diagblockshift(_cache2vcat(a), _cache2vcat(b))
6569

66-
diagblockshift(op::Operator) =
67-
diagblockshift(blocklengths(domainspace(op)),blocklengths(rangespace(op)))
70+
diagblockshift(op::Operator) = diagblockshift(blocklengths(domainspace(op)),blocklengths(rangespace(op)))
6871

6972

7073
function CachedOperator(::Type{BlockBandedMatrix},op::Operator;padding::Bool=false)

0 commit comments

Comments
 (0)