@@ -38,7 +38,7 @@ LinearAlgebra.checksquare(a::AbstractPDMat) = size(a, 1)
3838 whiten!(a::AbstractMatrix, x::AbstractVecOrMat)
3939 whiten!(r::AbstractVecOrMat, a::AbstractPDMat, x::AbstractVecOrMat)
4040
41- Allocating and in-place versions of the `whiten`ing transform defined by `a` applied to `x`
41+ Allocating and in-place versions of the `whiten`ing transform defined by `a` applied to `x`.
4242
4343If the covariance of `x` is `a` then the covariance of the result will be `I`.
4444The name `whiten` indicates that this function transforms a correlated multivariate random
@@ -66,34 +66,80 @@ julia> W * W'
6666 0.0 1.0
6767```
6868
69- See also [`unwhiten`](@ref).
69+ `whiten` is the inverse transformation of [`unwhiten`](@ref).
70+
71+ See also [`invwhiten`](@ref) and [`invunwhiten`](ref)
7072"""
7173whiten (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = whiten (AbstractPDMat (a), x)
7274
75+ """
76+ invwhiten(a::AbstractMatrix, x::AbstractVecOrMat)
77+ invwhiten!(a::AbstractMatrix, x::AbstractVecOrMat)
78+ invwhiten!(r::AbstractVecOrMat, a::AbstractPDMat, x::AbstractVecOrMat)
79+
80+ Allocating and in-place versions of the `whiten`ing transform defined by `inv(a)` applied to `x`.
81+
82+ If the precision of `x` is `a` then the covariance of the result will be `I`.
83+ The name `invwhiten` indicates that this function transforms a correlated multivariate random
84+ variable to "white noise".
85+
86+ `invwhiten` is the inverse transformation of [`invunwhiten`](@ref).
87+
88+ See also [`whiten`](@ref) and [`unwhiten`](@ref)
89+ """
90+ invwhiten (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = invwhiten (AbstractPDMat (a), x)
91+
7392"""
7493 unwhiten(a::AbstractMatrix, x::AbstractVecOrMat)
7594 unwhiten!(a::AbstractMatrix, x::AbstractVecOrMat)
7695 unwhiten!(r::AbstractVecOrMat, a::AbstractPDMat, x::AbstractVecOrMat)
7796
78- Allocating and in-place versions of the `unwhiten`ing transform defined by `a` applied to `x`
97+ Allocating and in-place versions of the `unwhiten`ing transform defined by `a` applied to `x`.
7998
8099If the covariance of `x` is `I` then the covariance of the result will be `a`.
81100The name `unwhiten` indicates that this function transforms an uncorrelated "white noise" signal
82101into a signal with the given covariance.
83102
84103`unwhiten` is the inverse transformation of [`whiten`](@ref).
104+
105+ See also [`invwhiten`](@ref) and [`invunwhiten`](@ref)
85106"""
86107unwhiten (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = unwhiten (AbstractPDMat (a), x)
87108
109+ """
110+ invunwhiten(a::AbstractMatrix, x::AbstractVecOrMat)
111+ invunwhiten!(a::AbstractMatrix, x::AbstractVecOrMat)
112+ invunwhiten!(r::AbstractVecOrMat, a::AbstractPDMat, x::AbstractVecOrMat)
113+
114+ Allocating and in-place versions of the `unwhiten`ing transform defined by `inv(a)` applied to `x`.
115+
116+ If the covariance of `x` is `I` then the precision of the result will be `a`.
117+ The name `invunwhiten` indicates that this function transforms an uncorrelated "white noise" signal
118+ into a signal with the given covariance.
119+
120+ `invunwhiten` is the inverse transformation of [`invwhiten`](@ref).
121+
122+ See also [`whiten`](@ref) and [`unwhiten`](@ref)
123+ """
124+ invunwhiten (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = invunwhiten (AbstractPDMat (a), x)
125+
88126whiten! (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = whiten! (x, a, x)
127+ invwhiten! (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = invwhiten! (x, a, x)
89128unwhiten! (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = unwhiten! (x, a, x)
129+ invunwhiten! (a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat ) = invunwhiten! (x, a, x)
90130
91131function whiten! (r:: AbstractVecOrMat , a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat )
92132 return whiten! (r, AbstractPDMat (a), x)
93133end
134+ function invwhiten! (r:: AbstractVecOrMat , a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat )
135+ return invwhiten! (r, AbstractPDMat (a), x)
136+ end
94137function unwhiten! (r:: AbstractVecOrMat , a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat )
95138 return unwhiten! (r, AbstractPDMat (a), x)
96139end
140+ function invunwhiten! (r:: AbstractVecOrMat , a:: AbstractMatrix{<:Real} , x:: AbstractVecOrMat )
141+ return invunwhiten! (r, AbstractPDMat (a), x)
142+ end
97143
98144# # quad
99145
0 commit comments