-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from JuliaStats/anj/cholmod
Only define methods for sparse matrices when CHOLMOD is available.
- Loading branch information
Showing
6 changed files
with
46 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
julia 0.4 | ||
julia 0.5 | ||
Compat 0.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
# needs special attention to Cholesky, as the syntax & behavior changes in 0.4-pre | ||
|
||
if VERSION >= v"0.5.0-dev+907" | ||
@compat CholType{T,S<:AbstractMatrix} = Cholesky{T,S} | ||
chol_lower(a::Matrix) = ctranspose(chol(a)) | ||
|
||
@compat CholTypeSparse{T} = SparseArrays.CHOLMOD.Factor{T} | ||
|
||
chol_lower(cf::CholTypeSparse) = cf[:L] | ||
elseif VERSION >= v"0.4.0-dev+4370" | ||
# error("Choleksy changes in 0.4.0-dev+4370 (PR #10862), we are still working to make it work with these changes.") | ||
|
||
@compat CholType{T,S<:AbstractMatrix} = Cholesky{T,S} | ||
chol_lower(a::Matrix) = chol(a, Val{:L}) | ||
@compat CholType{T,S<:AbstractMatrix} = Cholesky{T,S} | ||
chol_lower(a::Matrix) = ctranspose(chol(a)) | ||
|
||
if isdefined(Base.SparseArrays, :CHOLMOD) | ||
@compat CholTypeSparse{T} = SparseArrays.CHOLMOD.Factor{T} | ||
|
||
chol_lower(cf::CholTypeSparse) = cf[:L] | ||
else | ||
@compat CholType{T,S} = Cholesky{T} | ||
chol_lower(a::Matrix) = chol(a, :L) | ||
|
||
@compat CholTypeSparse{T} = Base.LinAlg.CHOLMOD.CholmodFactor{T} | ||
|
||
chol_lower(cf::CholTypeSparse) = cf | ||
end |