Skip to content

Commit

Permalink
Fixed no-inline getindex for UnitTriangular types
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Mar 11, 2016
1 parent d72842a commit 70f402a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/linalg/triangular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ function full!{T,S}(A::UnitUpperTriangular{T,S})
B
end

getindex{T,S}(A::UnitLowerTriangular{T,S}, i::Integer, j::Integer) = i > j ? A.data[i,j] : ifelse(i == j, one(T), zero(A.data[j,i]))
getindex{T,S}(A::UnitLowerTriangular{T,S}, i::Integer, j::Integer) = i > j ? A.data[i,j] : ifelse(i == j, one(T), zero(T))
getindex{T,S}(A::LowerTriangular{T,S}, i::Integer, j::Integer) = i >= j ? A.data[i,j] : zero(A.data[j,i])
getindex{T,S}(A::UnitUpperTriangular{T,S}, i::Integer, j::Integer) = i < j ? A.data[i,j] : ifelse(i == j, one(T), zero(A.data[j,i]))
getindex{T,S}(A::UnitUpperTriangular{T,S}, i::Integer, j::Integer) = i < j ? A.data[i,j] : ifelse(i == j, one(T), zero(T))
getindex{T,S}(A::UpperTriangular{T,S}, i::Integer, j::Integer) = i <= j ? A.data[i,j] : zero(A.data[j,i])

function setindex!(A::UpperTriangular, x, i::Integer, j::Integer)
Expand Down

0 comments on commit 70f402a

Please sign in to comment.