From 0bc1ae379ac821e308ef4e0f1d08dcd32ba12f47 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 8 Dec 2023 10:45:53 +0000 Subject: [PATCH] build based on f42003e --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e8784b2..65fc028 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-06T08:25:15","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-08T10:45:49","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index af5014e..aca7602 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,5 +1,5 @@ -Home · BlockBandedMatrices.jl

BlockBandedMatrices.jl Documentation

Creating block-banded and banded-block-banded matrices

BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix(A::Union{AbstractMatrix,UniformScaling},
+Home · BlockBandedMatrices.jl

BlockBandedMatrices.jl Documentation

Creating block-banded and banded-block-banded matrices

BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix(A::Union{AbstractMatrix,UniformScaling},
                     rows::AbstractVector{Int}, cols::AbstractVector{Int},
                     (l,u)::NTuple{2,Int})

Return a sum(rows) × sum(cols) BlockBandedMatrix, with rows by cols blocks, with (l,u) as the block-bandwidth. The structural non-zero entries are equal to the corresponding indices of A.

Examples

julia> using LinearAlgebra, FillArrays
 
@@ -29,7 +29,7 @@
  ─────┼────────────┼───────────────
   ⋅   │   ⋅    ⋅   │  1.0  1.0  1.0
   ⋅   │   ⋅    ⋅   │  1.0  1.0  1.0
-  ⋅   │   ⋅    ⋅   │  1.0  1.0  1.0
source
BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix(A::AbstractMatrix, (l,u)::NTuple{2,Int})

Return a BlockBandedMatrix with block-bandwidths (l,u), where the structural non-zero blocks correspond to those of A.

Examples

julia> using BlockArrays
+  ⋅   │   ⋅    ⋅   │  1.0  1.0  1.0
source
BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix(A::AbstractMatrix, (l,u)::NTuple{2,Int})

Return a BlockBandedMatrix with block-bandwidths (l,u), where the structural non-zero blocks correspond to those of A.

Examples

julia> using BlockArrays
 
 julia> B = BlockArray(ones(6,6), 1:3, 1:3);
 
@@ -42,8 +42,8 @@
  ─────┼────────────┼───────────────
   ⋅   │  1.0  1.0  │  1.0  1.0  1.0
   ⋅   │  1.0  1.0  │  1.0  1.0  1.0
-  ⋅   │  1.0  1.0  │  1.0  1.0  1.0
source
BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix{T}(undef, rows::AbstractVector{Int}, cols::AbstractVector{Int},
-                    (l,u)::NTuple{2,Int})

Return an unitialized sum(rows) × sum(cols) BlockBandedMatrix having eltype T, with rows by cols blocks and (l,u) as the block-bandwidth.

source
BlockBandedMatrices.BlockBandedMatrixMethod
BlockBandedMatrix{T}(undef, rows::AbstractVector{Int}, cols::AbstractVector{Int},
+                    (l,u)::NTuple{2,Int})

Return an unitialized sum(rows) × sum(cols) BlockBandedMatrix having eltype T, with rows by cols blocks and (l,u) as the block-bandwidth.

source
BlockBandedMatrices.BandedBlockBandedMatrixType
BandedBlockBandedMatrix(M::Union{UniformScaling,AbstractMatrix},
                            rows, cols, (l, u), (λ, μ))

Return a sum(rows) × sum(cols) banded-block-banded matrix A, with block-bandwidths (l,u) and where A[Block(K,J)] is a BandedMatrix of size rows[K]×cols[J] with bandwidths (λ,μ). The structural non-zero elements of the returned matrix corresponds to those of M.

Examples

julia> using LinearAlgebra, FillArrays
 
 julia> BandedBlockBandedMatrix(I, [3,4,3], [3,4,3], (1,1), (1,1))
@@ -74,7 +74,7 @@
  ────────────┼─────────────────┼────────────
  ⋅  ⋅  ⋅  ⋅  │  1  1  ⋅  ⋅  ⋅  │  1  1  ⋅  ⋅
  ⋅  ⋅  ⋅  ⋅  │  1  1  1  ⋅  ⋅  │  1  1  1  ⋅
- ⋅  ⋅  ⋅  ⋅  │  ⋅  1  1  1  ⋅  │  ⋅  1  1  1
source
BlockBandedMatrices.BandedBlockBandedMatrixMethod
BandedBlockBandedMatrix{T}(undef, rows, cols, (l, u), (λ, μ))

Return an unitialized BandedBlockBandedMatrix having eltype T, with block-bandwidths (l,u) and where A[Block(K,J)] is a BandedMatrix{T} of size rows[K]×cols[J] with bandwidths (λ,μ).

source
BlockBandedMatrices.BandedBlockBandedMatrixMethod
BandedBlockBandedMatrix{T}(undef, rows, cols, (l, u), (λ, μ))

Return an unitialized BandedBlockBandedMatrix having eltype T, with block-bandwidths (l,u) and where A[Block(K,J)] is a BandedMatrix{T} of size rows[K]×cols[J] with bandwidths (λ,μ).

source
BlockBandedMatrices.BlockSkylineMatrixType
BlockSkylineMatrix{T,LL,UU}(M::Union{UndefInitializer,UniformScaling,AbstractMatrix},
                             rows, cols, (l::LL, u::UU))

returns a sum(rows)×sum(cols) block-banded matrix A having elements of type T, with block-bandwidths (l,u) and where A[Block(K,J)] is a Matrix{T} of size rows[K]×cols[J].

(l,u) may be integers for constant bandwidths or integer vectors of lengths rows and cols, respectively, for ragged bands.

Examples

julia> using LinearAlgebra, FillArrays
 
 julia> BlockSkylineMatrix(I, [2,3,4], [1,2,3], ([2,0,1],[1,1,1]))
@@ -103,7 +103,7 @@
  1.0  │   ⋅    ⋅   │  1.0  1.0  1.0
  1.0  │   ⋅    ⋅   │  1.0  1.0  1.0
  1.0  │   ⋅    ⋅   │  1.0  1.0  1.0
- 1.0  │   ⋅    ⋅   │  1.0  1.0  1.0
source

Accessing block-banded and banded-block-banded matrices

BlockBandedMatrices.subblockbandwidthsFunction
subblockbandwidths(A)

returns the sub-block bandwidths of A, where A is a banded-block-banded matrix. In other words, A[Block(K,J)] will return a BandedMatrix with bandwidths given by subblockbandwidths(A).

source
BlockBandedMatrices.subblockbandwidthFunction
subblockbandwidth(A, i)

returns the sub-block lower (i == 1) or upper (i == 2) bandwidth of A, where A is a banded-block-banded matrix. In other words, A[Block(K,J)] will return a BandedMatrix with the returned lower/upper bandwidth.

source

Implementation

A BlockBandedMatrix stores the entries in a single vector, ordered by columns. For example, if A is a BlockBandedMatrix with block-bandwidths (A.l,A.u) == (1,0) and the block sizes fill(2, N) where N = 3 is the number of row and column blocks, then A has zero structure

[ a_11 a_12 │  ⋅    ⋅
+ 1.0  │   ⋅    ⋅   │  1.0  1.0  1.0
source

Accessing block-banded and banded-block-banded matrices

BlockBandedMatrices.subblockbandwidthsFunction
subblockbandwidths(A)

returns the sub-block bandwidths of A, where A is a banded-block-banded matrix. In other words, A[Block(K,J)] will return a BandedMatrix with bandwidths given by subblockbandwidths(A).

source
BlockBandedMatrices.subblockbandwidthFunction
subblockbandwidth(A, i)

returns the sub-block lower (i == 1) or upper (i == 2) bandwidth of A, where A is a banded-block-banded matrix. In other words, A[Block(K,J)] will return a BandedMatrix with the returned lower/upper bandwidth.

source

Implementation

A BlockBandedMatrix stores the entries in a single vector, ordered by columns. For example, if A is a BlockBandedMatrix with block-bandwidths (A.l,A.u) == (1,0) and the block sizes fill(2, N) where N = 3 is the number of row and column blocks, then A has zero structure

[ a_11 a_12 │  ⋅    ⋅
   a_21 a_22 │  ⋅    ⋅
   ──────────┼──────────
   a_31 a_32 │ a_33 a_34
@@ -121,4 +121,4 @@
  a_21  ×   │ a_43  ×
  ──────────┼──────────
  a_31 a_42 │ a_53 a_64
- a_41  ×   │ a_63  ×   ]

where × is an entry in memory that is not used.

The reasoning behind this storage scheme as that each block still satisfies the banded matrix interface.

Layout

+ a_41 × │ a_63 × ]

where × is an entry in memory that is not used.

The reasoning behind this storage scheme as that each block still satisfies the banded matrix interface.

Layout

BlockBandedMatrices.AbstractBlockBandedLayoutType
AbstractBlockBandedLayout

isa a MemoryLayout that indicates that the array implements the block-banded interface.

source
BlockBandedMatrices.AbstractBandedBlockBandedLayoutType
AbstractBandedBlockBandedLayout

isa a MemoryLayout that indicates that the array implements the banded-block-banded interface.

source