Skip to content

Commit

Permalink
Add a BlocksOfDiagonals docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelbosch committed Feb 23, 2024
1 parent b42fbc7 commit 6f9e081
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/blocksofdiagonals.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
"""
BlocksOfDiagonals(blocks::Vector{V}) where {T,V<:AbstractMatrix{T}}
TODO
A block matrix where each block is a diagonal matrix.
The implementation of this object is closer to that of a block-diagonal matrix, as done
e.g. in BlockDiagonals.jl. That's because `BlocksOfDiagonals` can be permuted to be a
block-diagonal matrix. Also, in our context here `BlocksOfDiagonals` is used to represent
covariance matrices of states, and then each block can be interpreted as the covariance
matrix of a certain dimension of a state and its derivatives.
`BlocksOfDiagonals` can also be transformed into a `BlockArrays.BlockArray`!
Just call `BlockArrays.BlockArray(A::BlocksOfDiagonals)`.
"""
struct BlocksOfDiagonals{T<:Number,V<:AbstractMatrix{T}} <: AbstractMatrix{T}
blocks::Vector{V}
Expand Down

0 comments on commit 6f9e081

Please sign in to comment.