filtron / MarkovKernels.jl

Marginal distributions and Markov kernels that play nice with each other for the purpose of Bayesian state estimation.
MIT License
17 stars 2 forks source link

tidier cov parameters #105

Closed filtron closed 2 months ago

filtron commented 2 months ago

Fixes #99

New type union for general matrix covariances

const RSym{T,S} = Symmetric{T,S} where {T<:Real,S}
const CHerm{T,S} = Hermitian{T,S} where {T<:Complex,S}
const SelfAdjoint{T,S} = Union{RSym{T,S},CHerm{T,S}} where {T,S}

Type specific methods:

selfadjoint(x::Number)
selfadjoint(A::AbstractMatrix{<:Real})
selfadjoint(A::AbstractMatrix{<:Complex})

Added compatibility with scalar covariances

i.e.

stein(Σ::Cholesky, Φ::Adjoint{<:Number,<:AbstractVector}) 
stein(Σ::Cholesky, Φ::Adjoint{<:Number,<:AbstractVector}, Q::Number)
schur_reduce(Π::Cholesky, C::Adjoint{<:Number,<:AbstractVector})
schur_reduce(Π::Cholesky, C::Adjoint{<:Number,<:AbstractVector}, R::Number)

and similar overloads for SelfAdjoint