Skip to content

Commit

Permalink
Let CHOLMOD handle memory allocation. Increase test coverage and remo…
Browse files Browse the repository at this point in the history
…ve some unused methods.
  • Loading branch information
andreasnoack committed Feb 8, 2015
1 parent 269a70c commit 3ec69db
Show file tree
Hide file tree
Showing 3 changed files with 899 additions and 682 deletions.
2 changes: 1 addition & 1 deletion base/linalg/symmetric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typealias HermOrSym{T,S} Union(Hermitian{T,S}, Symmetric{T,S})
typealias RealHermSymComplexHerm{T<:Real,S} Union(Hermitian{T,S}, Symmetric{T,S}, Hermitian{Complex{T},S})

size(A::HermOrSym, args...) = size(A.data, args...)
getindex(A::Symmetric, i::Integer) = ((q, r) = divrem(i - 1, size(A, 1)); A[r + 1, q + 1])
getindex(A::HermOrSym, i::Integer) = ((q, r) = divrem(i - 1, size(A, 1)); A[r + 1, q + 1])
getindex(A::Symmetric, i::Integer, j::Integer) = (A.uplo == 'U') == (i < j) ? getindex(A.data, i, j) : getindex(A.data, j, i)
getindex(A::Hermitian, i::Integer, j::Integer) = (A.uplo == 'U') == (i < j) ? getindex(A.data, i, j) : conj(getindex(A.data, j, i))
full(A::Symmetric) = copytri!(copy(A.data), A.uplo)
Expand Down
Loading

0 comments on commit 3ec69db

Please sign in to comment.