Skip to content

Commit

Permalink
Merge pull request #95 from bayesthm/master
Browse files Browse the repository at this point in the history
more stable quad and invquad with vectors
  • Loading branch information
andreasnoack committed Jun 10, 2019
2 parents c4fe96f + f67bfd5 commit 9ccf54e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pdmat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ end

### quadratic forms

quad(a::PDMat, x::AbstractVector) = dot(x, a * x)
invquad(a::PDMat, x::AbstractVector) = dot(x, a \ x)
quad(a::PDMat, x::AbstractVector) = sum(abs2, a.chol.U * x)
invquad(a::PDMat, x::AbstractVector) = sum(abs2, a.chol.L \ x)

"""
quad!(r::AbstractArray, a::AbstractPDMat, x::StridedMatrix)
Expand Down

0 comments on commit 9ccf54e

Please sign in to comment.