Skip to content

Finite sections of JacobiTriangle Jacobi matrices are ApplyArrays instead of BandedBlockBandedMatrices #216

@MikaelSlevinsky

Description

@MikaelSlevinsky

I don't think this used to be the case.

julia> jacobimatrix(Val(1), RectPolynomial(ChebyshevT(), ChebyshevT()))[Block.(1:5), Block.(1:5)]
5×5-blocked 15×15 BandedBlockBandedMatrix{Float64} with block-bandwidths (1, 1) and sub-block-bandwidths block-bandwidths (0, 0) with data 3×5-blocked 3×15 BlockedMatrix{Float64}:
 0.00.5                                        
 ─────┼────────────┼─────────────────┼──────────────────────┼─────────────────────────
 1.00.0   0.5                                    
     0.0   0.5                                
 ─────┼────────────┼─────────────────┼──────────────────────┼─────────────────────────
  0.5   0.0       0.5                            
     1.0   0.0      0.5                        
             0.0       0.5                    
 ─────┼────────────┼─────────────────┼──────────────────────┼─────────────────────────
      0.5       0.0           0.5                
         0.5      0.0          0.5            
             1.0       0.0          0.5        
                         0.0           0.5    
 ─────┼────────────┼─────────────────┼──────────────────────┼─────────────────────────
              0.5           0.0                
                 0.5          0.0            
                     0.5          0.0        
                         1.0           0.0    
                                         0.0

julia> typeof(ans)
BlockBandedMatrices.BandedBlockBandedMatrix{Float64, BlockedMatrix{Float64, Matrix{Float64}, Tuple{BlockedOneTo{Int64, StepRangeLen{Int64, Int64, Int64, Int64}}, BlockedOneTo{Int64, Vector{Int64}}}}, BlockedOneTo{Int64, Vector{Int64}}}

julia> jacobimatrix(Val(1), JacobiTriangle())[Block.(1:5), Block.(1:5)]
(5×5-blocked 15×15 BandedBlockBandedMatrix{Float64} with block-bandwidths (1, 0) and sub-block-bandwidths block-bandwidths (0, 0) with data 2×5-blocked 2×15 BlockVcat{Float64}) * (5×5-blocked 15×15 BandedBlockBandedMatrix{Float64} with block-bandwidths (0, 1) and sub-block-bandwidths block-bandwidths (0, 0) with data 2×5-blocked 2×15 BlockVcat{Float64}) with indices BlockedOneTo([1, 3, 6, 10, 15])×BlockedOneTo([1, 3, 6, 10, 15]):
 0.3333330.166667                                                                                            
 ──────────┼─────────────────┼────────────────────────────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────
 0.3333330.466667   0.2                                                                                        
          0.2        0.133333                                                                          
 ──────────┼─────────────────┼────────────────────────────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────
  0.3        0.485714            0.214286                                                                 
          0.2        0.371429           0.178571                                                        
                            0.142857                 0.107143                                               
 ──────────┼─────────────────┼────────────────────────────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────
           0.285714            0.492063                     0.222222                                      
                   0.238095           0.428571                    0.2                                  
                            0.142857                 0.301587                    0.155556                    
                                                       0.111111                          0.0888889          
 ──────────┼─────────────────┼────────────────────────────────┼──────────────────────────────────────────┼────────────────────────────────────────────────────
                             0.277778                     0.494949                                      
                                     0.25                        0.454545                             
                                              0.194444                    0.373737                    
                                                       0.111111                          0.252525           
                                                                                            0.0909091

julia> typeof(ans)
LazyArrays.ApplyArray{Float64, 2, typeof(*), Tuple{BlockBandedMatrices.BandedBlockBandedMatrix{Float64, LazyBandedMatrices.BlockVcat{Float64, 2, Tuple{Adjoint{Float64, BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedOneTo{Int64, Vector{Int64}}}}}, Adjoint{Float64, BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedOneTo{Int64, Vector{Int64}}}}}}, Tuple{BlockedOneTo{Int64, StaticArraysCore.SVector{2, Int64}}, BlockedOneTo{Int64, Vector{Int64}}}}, BlockedOneTo{Int64, Vector{Int64}}}, BlockBandedMatrices.BandedBlockBandedMatrix{Float64, LazyBandedMatrices.BlockVcat{Float64, 2, Tuple{Adjoint{Float64, BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedOneTo{Int64, Vector{Int64}}}}}, Adjoint{Float64, BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedOneTo{Int64, Vector{Int64}}}}}}, Tuple{BlockedOneTo{Int64, StaticArraysCore.SVector{2, Int64}}, BlockedOneTo{Int64, Vector{Int64}}}}, BlockedOneTo{Int64, Vector{Int64}}}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions