Skip to content

Commit d8d1489

Browse files
committed
Merge pull request #15192 from pkofod/pkm/issymmetric
Changed issym to issymmetric.
2 parents 7199602 + 7a3cc31 commit d8d1489

27 files changed

+76
-71
lines changed

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ Deprecated or removed
126126

127127
* Deprecate `chol(A,Val{:U/:L})` in favor of `chol(A)` ([#13680]).
128128

129+
* `issym` is deprecated in favor of `issymmetric` to match similar functions (`ishermitian`, ...) ([#15192])
130+
129131
Julia v0.4.0 Release Notes
130132
==========================
131133

base/deprecated.jl

+3
Original file line numberDiff line numberDiff line change
@@ -990,3 +990,6 @@ end
990990
export call
991991

992992
@deprecate_binding LambdaStaticData LambdaInfo
993+
994+
# Changed issym to issymmetric. #15192
995+
@deprecate issym issymmetric

base/docs/helpdb/Base.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -6698,11 +6698,11 @@ The arguments to a function or constructor are outside the valid domain.
66986698
DomainError
66996699

67006700
"""
6701-
issym(A) -> Bool
6701+
issymmetric(A) -> Bool
67026702
67036703
Test whether a matrix is symmetric.
67046704
"""
6705-
issym
6705+
issymmetric
67066706

67076707
"""
67086708
acosh(x)
@@ -8427,7 +8427,7 @@ rand!
84278427
84288428
Compute the Bunch-Kaufman [^Bunch1977] factorization of a real symmetric or complex Hermitian
84298429
matrix `A` and return a `BunchKaufman` object. The following functions are available for
8430-
`BunchKaufman` objects: `size`, `\\`, `inv`, `issym`, `ishermitian`.
8430+
`BunchKaufman` objects: `size`, `\\`, `inv`, `issymmetric`, `ishermitian`.
84318431
84328432
[^Bunch1977]: J R Bunch and L Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Mathematics of Computation 31:137 (1977), 163-179. [url](http://www.ams.org/journals/mcom/1977-31-137/S0025-5718-1977-0428694-0).
84338433

base/exports.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ export
664664
ishermitian,
665665
isposdef!,
666666
isposdef,
667-
issym,
667+
issymmetric,
668668
istril,
669669
istriu,
670670
kron,

base/linalg.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export
8282
ishermitian,
8383
isposdef,
8484
isposdef!,
85-
issym,
85+
issymmetric,
8686
istril,
8787
istriu,
8888
kron,

base/linalg/arnoldi.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function _eigs(A, B;
154154
T = eltype(A)
155155
iscmplx = T <: Complex
156156
isgeneral = B !== I
157-
sym = issym(A) && !iscmplx
157+
sym = issymmetric(A) && !iscmplx
158158
nevmax=sym ? n-1 : n-2
159159
if nevmax <= 0
160160
throw(ArgumentError("Input matrix A is too small. Use eigfact instead."))
@@ -297,7 +297,7 @@ end
297297
## v = [ left_singular_vector; right_singular_vector ]
298298
*{T,S}(s::SVDOperator{T,S}, v::Vector{T}) = [s.X * v[s.m+1:end]; s.X' * v[1:s.m]]
299299
size(s::SVDOperator) = s.m + s.n, s.m + s.n
300-
issym(s::SVDOperator) = true
300+
issymmetric(s::SVDOperator) = true
301301

302302
svds{T<:BlasFloat}(A::AbstractMatrix{T}; kwargs...) = _svds(A; kwargs...)
303303
svds(A::AbstractMatrix{BigFloat}; kwargs...) = throw(MethodError(svds, Any[A, kwargs...]))

base/linalg/bitarray.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ end
134134

135135
## Structure query functions
136136

137-
issym(A::BitMatrix) = size(A, 1)==size(A, 2) && countnz(A - A.')==0
138-
ishermitian(A::BitMatrix) = issym(A)
137+
issymmetric(A::BitMatrix) = size(A, 1)==size(A, 2) && countnz(A - A.')==0
138+
ishermitian(A::BitMatrix) = issymmetric(A)
139139

140140
function nonzero_chunks(chunks::Vector{UInt64}, pos0::Int, pos1::Int)
141141
k0, l0 = Base.get_chunks_id(pos0)

base/linalg/bunchkaufman.jl

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ immutable BunchKaufman{T,S<:AbstractMatrix} <: Factorization{T}
1414
end
1515
BunchKaufman{T}(LD::AbstractMatrix{T}, ipiv::Vector{BlasInt}, uplo::Char, symmetric::Bool, rook::Bool) = BunchKaufman{T,typeof(LD)}(LD, ipiv, uplo, symmetric, rook)
1616

17-
function bkfact!{T<:BlasReal}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issym(A), rook::Bool=false)
17+
function bkfact!{T<:BlasReal}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issymmetric(A), rook::Bool=false)
1818
if !symmetric
1919
throw(ArgumentError("Bunch-Kaufman decomposition is only valid for symmetric matrices"))
2020
end
2121
LD, ipiv = rook ? LAPACK.sytrf_rook!(char_uplo(uplo) , A) : LAPACK.sytrf!(char_uplo(uplo) , A)
2222
BunchKaufman(LD, ipiv, char_uplo(uplo), symmetric, rook)
2323
end
24-
function bkfact!{T<:BlasComplex}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issym(A), rook::Bool=false)
24+
function bkfact!{T<:BlasComplex}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issymmetric(A), rook::Bool=false)
2525
if rook
2626
LD, ipiv = (symmetric ? LAPACK.sytrf_rook! : LAPACK.hetrf_rook!)(char_uplo(uplo) , A)
2727
else
2828
LD, ipiv = (symmetric ? LAPACK.sytrf! : LAPACK.hetrf!)(char_uplo(uplo) , A)
2929
end
3030
BunchKaufman(LD, ipiv, char_uplo(uplo), symmetric, rook)
3131
end
32-
bkfact{T<:BlasFloat}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issym(A), rook::Bool=false) = bkfact!(copy(A), uplo, symmetric, rook)
33-
bkfact{T}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issym(A), rook::Bool=false) = bkfact!(convert(Matrix{promote_type(Float32,typeof(sqrt(one(T))))},A),uplo,symmetric,rook)
32+
bkfact{T<:BlasFloat}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issymmetric(A), rook::Bool=false) = bkfact!(copy(A), uplo, symmetric, rook)
33+
bkfact{T}(A::StridedMatrix{T}, uplo::Symbol=:U, symmetric::Bool=issymmetric(A), rook::Bool=false) = bkfact!(convert(Matrix{promote_type(Float32,typeof(sqrt(one(T))))},A),uplo,symmetric,rook)
3434

3535
convert{T}(::Type{BunchKaufman{T}},B::BunchKaufman) = BunchKaufman(convert(Matrix{T},B.LD),B.ipiv,B.uplo,B.symmetric,B.rook)
3636
convert{T}(::Type{Factorization{T}}, B::BunchKaufman) = convert(BunchKaufman{T}, B)
3737

3838
size(B::BunchKaufman) = size(B.LD)
3939
size(B::BunchKaufman,d::Integer) = size(B.LD,d)
40-
issym(B::BunchKaufman) = B.symmetric
40+
issymmetric(B::BunchKaufman) = B.symmetric
4141
ishermitian(B::BunchKaufman) = !B.symmetric
4242

4343
function inv{T<:BlasReal}(B::BunchKaufman{T})
@@ -49,7 +49,7 @@ function inv{T<:BlasReal}(B::BunchKaufman{T})
4949
end
5050

5151
function inv{T<:BlasComplex}(B::BunchKaufman{T})
52-
if issym(B)
52+
if issymmetric(B)
5353
if B.rook
5454
copytri!(LAPACK.sytri_rook!(B.uplo, copy(B.LD), B.ipiv), B.uplo)
5555
else
@@ -73,9 +73,9 @@ function A_ldiv_B!{T<:BlasReal}(B::BunchKaufman{T}, R::StridedVecOrMat{T})
7373
end
7474
function A_ldiv_B!{T<:BlasComplex}(B::BunchKaufman{T}, R::StridedVecOrMat{T})
7575
if B.rook
76-
(issym(B) ? LAPACK.sytrs_rook! : LAPACK.hetrs_rook!)(B.uplo, B.LD, B.ipiv, R)
76+
(issymmetric(B) ? LAPACK.sytrs_rook! : LAPACK.hetrs_rook!)(B.uplo, B.LD, B.ipiv, R)
7777
else
78-
(issym(B) ? LAPACK.sytrs! : LAPACK.hetrs!)(B.uplo, B.LD, B.ipiv, R)
78+
(issymmetric(B) ? LAPACK.sytrs! : LAPACK.hetrs!)(B.uplo, B.LD, B.ipiv, R)
7979
end
8080
end
8181

@@ -94,9 +94,9 @@ function det(F::BunchKaufman)
9494
else
9595
# 2x2 pivot case. Make sure not to square before the subtraction by scaling with the off-diagonal element. This is safe because the off diagonal is always large for 2x2 pivots.
9696
if F.uplo == 'U'
97-
d *= M[i, i + 1]*(M[i,i]/M[i, i + 1]*M[i + 1, i + 1] - (issym(F) ? M[i, i + 1] : conj(M[i, i + 1])))
97+
d *= M[i, i + 1]*(M[i,i]/M[i, i + 1]*M[i + 1, i + 1] - (issymmetric(F) ? M[i, i + 1] : conj(M[i, i + 1])))
9898
else
99-
d *= M[i + 1,i]*(M[i, i]/M[i + 1, i]*M[i + 1, i + 1] - (issym(F) ? M[i + 1, i] : conj(M[i + 1, i])))
99+
d *= M[i + 1,i]*(M[i, i]/M[i + 1, i]*M[i + 1, i + 1] - (issymmetric(F) ? M[i + 1, i] : conj(M[i + 1, i])))
100100
end
101101
i += 2
102102
end

base/linalg/dense.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ end
340340
logm(a::Complex) = log(a)
341341

342342
function sqrtm{T<:Real}(A::StridedMatrix{T})
343-
if issym(A)
343+
if issymmetric(A)
344344
return full(sqrtm(Symmetric(A)))
345345
end
346346
n = checksquare(A)

base/linalg/diagonal.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ parent(D::Diagonal) = D.diag
6565

6666
ishermitian{T<:Real}(D::Diagonal{T}) = true
6767
ishermitian(D::Diagonal) = all(D.diag .== real(D.diag))
68-
issym(D::Diagonal) = true
68+
issymmetric(D::Diagonal) = true
6969
isposdef(D::Diagonal) = all(D.diag .> 0)
7070

7171
factorize(D::Diagonal) = D

base/linalg/eigen.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ isposdef(A::Union{Eigen,GeneralizedEigen}) = isreal(A.values) && all(A.values .>
2828
function eigfact!{T<:BlasReal}(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true)
2929
n = size(A, 2)
3030
n==0 && return Eigen(zeros(T, 0), zeros(T, 0, 0))
31-
issym(A) && return eigfact!(Symmetric(A))
31+
issymmetric(A) && return eigfact!(Symmetric(A))
3232
A, WR, WI, VL, VR, _ = LAPACK.geevx!(permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N'), 'N', 'V', 'N', A)
3333
all(WI .== 0.) && return Eigen(WR, VR)
3434
evec = zeros(Complex{T}, n, n)
@@ -81,7 +81,7 @@ eigvals{T,V,S,U}(F::Union{Eigen{T,V,S,U}, GeneralizedEigen{T,V,S,U}}) = F[:value
8181
Same as `eigvals`, but saves space by overwriting the input `A` (and `B`), instead of creating a copy.
8282
"""
8383
function eigvals!{T<:BlasReal}(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true)
84-
issym(A) && return eigvals!(Symmetric(A))
84+
issymmetric(A) && return eigvals!(Symmetric(A))
8585
_, valsre, valsim, _ = LAPACK.geevx!(permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N'), 'N', 'N', 'N', A)
8686
return all(valsim .== 0) ? valsre : complex(valsre, valsim)
8787
end
@@ -120,7 +120,7 @@ det(A::Eigen) = prod(A.values)
120120

121121
# Generalized eigenproblem
122122
function eigfact!{T<:BlasReal}(A::StridedMatrix{T}, B::StridedMatrix{T})
123-
issym(A) && isposdef(B) && return eigfact!(Symmetric(A), Symmetric(B))
123+
issymmetric(A) && isposdef(B) && return eigfact!(Symmetric(A), Symmetric(B))
124124
n = size(A, 1)
125125
alphar, alphai, beta, _, vr = LAPACK.ggev!('N', 'V', A, B)
126126
all(alphai .== 0) && return GeneralizedEigen(alphar ./ beta, vr)
@@ -162,7 +162,7 @@ function eig(A::Number, B::Number)
162162
end
163163

164164
function eigvals!{T<:BlasReal}(A::StridedMatrix{T}, B::StridedMatrix{T})
165-
issym(A) && isposdef(B) && return eigvals!(Symmetric(A), Symmetric(B))
165+
issymmetric(A) && isposdef(B) && return eigvals!(Symmetric(A), Symmetric(B))
166166
alphar, alphai, beta, vl, vr = LAPACK.ggev!('N', 'N', A, B)
167167
return (all(alphai .== 0) ? alphar : complex(alphar, alphai))./beta
168168
end

base/linalg/generic.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ condskeel{T<:Integer}(A::AbstractMatrix{T}, p::Real=Inf) = norm(abs(inv(float(A)
382382
condskeel(A::AbstractMatrix, x::AbstractVector, p::Real=Inf) = norm(abs(inv(A))*abs(A)*abs(x), p)
383383
condskeel{T<:Integer}(A::AbstractMatrix{T}, x::AbstractVector, p::Real=Inf) = norm(abs(inv(float(A)))*abs(A)*abs(x), p)
384384

385-
function issym(A::AbstractMatrix)
385+
function issymmetric(A::AbstractMatrix)
386386
m, n = size(A)
387387
if m != n
388388
return false
@@ -395,7 +395,7 @@ function issym(A::AbstractMatrix)
395395
return true
396396
end
397397

398-
issym(x::Number) = true
398+
issymmetric(x::Number) = true
399399

400400
function ishermitian(A::AbstractMatrix)
401401
m, n = size(A)

base/linalg/symmetric.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ copy{T,S}(A::Hermitian{T,S}) = Hermitian{T,S}(copy(A.data),A.uplo)
5959
ishermitian(A::Hermitian) = true
6060
ishermitian{T<:Real,S}(A::Symmetric{T,S}) = true
6161
ishermitian{T<:Complex,S}(A::Symmetric{T,S}) = all(imag(A.data) .== 0)
62-
issym{T<:Real,S}(A::Hermitian{T,S}) = true
63-
issym{T<:Complex,S}(A::Hermitian{T,S}) = all(imag(A.data) .== 0)
64-
issym(A::Symmetric) = true
62+
issymmetric{T<:Real,S}(A::Hermitian{T,S}) = true
63+
issymmetric{T<:Complex,S}(A::Hermitian{T,S}) = all(imag(A.data) .== 0)
64+
issymmetric(A::Symmetric) = true
6565
transpose(A::Symmetric) = A
6666
ctranspose{T<:Real}(A::Symmetric{T}) = A
6767
function ctranspose(A::Symmetric)
@@ -138,15 +138,15 @@ A_mul_B!{T<:BlasComplex,S<:StridedMatrix}(C::StridedMatrix{T}, A::StridedMatrix{
138138
*(A::HermOrSym, B::HermOrSym) = full(A)*full(B)
139139
*(A::StridedMatrix, B::HermOrSym) = A*full(B)
140140

141-
bkfact(A::HermOrSym) = bkfact(A.data, symbol(A.uplo), issym(A))
141+
bkfact(A::HermOrSym) = bkfact(A.data, symbol(A.uplo), issymmetric(A))
142142
factorize(A::HermOrSym) = bkfact(A)
143143

144144
# Is just RealHermSymComplexHerm, but type alias seems to be broken
145145
det{T<:Real,S}(A::Union{Hermitian{T,S}, Symmetric{T,S}, Hermitian{Complex{T},S}}) = real(det(bkfact(A)))
146146
det{T<:Real}(A::Symmetric{T}) = det(bkfact(A))
147147
det(A::Symmetric) = det(bkfact(A))
148148

149-
\{T,S<:StridedMatrix}(A::HermOrSym{T,S}, B::StridedVecOrMat) = \(bkfact(A.data, symbol(A.uplo), issym(A)), B)
149+
\{T,S<:StridedMatrix}(A::HermOrSym{T,S}, B::StridedVecOrMat) = \(bkfact(A.data, symbol(A.uplo), issymmetric(A)), B)
150150

151151
inv{T<:BlasFloat,S<:StridedMatrix}(A::Hermitian{T,S}) = Hermitian{T,S}(inv(bkfact(A.data, symbol(A.uplo))), A.uplo)
152152
inv{T<:BlasFloat,S<:StridedMatrix}(A::Symmetric{T,S}) = Symmetric{T,S}(inv(bkfact(A.data, symbol(A.uplo), true)), A.uplo)

base/sparse.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import Base.LinAlg: At_ldiv_B!, Ac_ldiv_B!
1313
import Base: @get!, acos, acosd, acot, acotd, acsch, asech, asin, asind, asinh,
1414
atan, atand, atanh, broadcast!, chol, conj!, cos, cosc, cosd, cosh, cospi, cot,
1515
cotd, coth, countnz, csc, cscd, csch, ctranspose!, diag, diff, done, dot, eig,
16-
exp10, exp2, eye, findn, floor, hash, indmin, inv, issym, istril, istriu, log10,
17-
log2, lu, maxabs, minabs, next, sec, secd, sech, show, showarray, sin, sinc,
18-
sind, sinh, sinpi, squeeze, start, sum, sumabs, sumabs2, summary, tan, tand,
19-
tanh, trace, transpose!, tril!, triu!, trunc, vecnorm, writemime, abs, abs2,
16+
exp10, exp2, eye, findn, floor, hash, indmin, inv, issymmetric, istril, istriu,
17+
log10, log2, lu, maxabs, minabs, next, sec, secd, sech, show, showarray, sin,
18+
sinc, sind, sinh, sinpi, squeeze, start, sum, sumabs, sumabs2, summary, tan,
19+
tand, tanh, trace, transpose!, tril!, triu!, trunc, vecnorm, writemime, abs, abs2,
2020
broadcast, ceil, complex, cond, conj, convert, copy, copy!, ctranspose, diagm,
2121
exp, expm1, factorize, find, findmax, findmin, findnz, float, full, getindex,
2222
hcat, hvcat, imag, indmax, ishermitian, kron, length, log, log1p, max, min,

base/sparse/cholmod.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Base: (*), convert, copy, eltype, get, getindex, show, showarray, size,
77

88
import Base.LinAlg: (\), A_mul_Bc, A_mul_Bt, Ac_ldiv_B, Ac_mul_B, At_ldiv_B, At_mul_B,
99
cholfact, cholfact!, det, diag, ishermitian, isposdef,
10-
issym, ldltfact, ldltfact!, logdet
10+
issymmetric, ldltfact, ldltfact!, logdet
1111

1212
importall ..SparseArrays
1313

@@ -986,7 +986,7 @@ function convert{Tv}(::Type{SparseMatrixCSC{Tv,SuiteSparse_long}}, A::Sparse{Tv}
986986
end
987987
function convert(::Type{Symmetric{Float64,SparseMatrixCSC{Float64,SuiteSparse_long}}}, A::Sparse{Float64})
988988
s = unsafe_load(A.p)
989-
if !issym(A)
989+
if !issymmetric(A)
990990
throw(ArgumentError("matrix is not symmetric"))
991991
end
992992
return Symmetric(SparseMatrixCSC(s.nrow, s.ncol, increment(pointer_to_array(s.p, (s.ncol + 1,), false)), increment(pointer_to_array(s.i, (s.nzmax,), false)), copy(pointer_to_array(s.x, (s.nzmax,), false))), s.stype > 0 ? :U : :L)
@@ -1536,7 +1536,7 @@ function isposdef{Tv<:VTypes}(A::SparseMatrixCSC{Tv,SuiteSparse_long})
15361536
true
15371537
end
15381538

1539-
function issym(A::Sparse)
1539+
function issymmetric(A::Sparse)
15401540
s = unsafe_load(A.p)
15411541
if s.stype != 0
15421542
return isreal(A)

base/sparse/sparsematrix.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2911,7 +2911,7 @@ function blkdiag(X::SparseMatrixCSC...)
29112911
end
29122912

29132913
## Structure query functions
2914-
issym(A::SparseMatrixCSC) = is_hermsym(A, IdFun())
2914+
issymmetric(A::SparseMatrixCSC) = is_hermsym(A, IdFun())
29152915

29162916
ishermitian(A::SparseMatrixCSC) = is_hermsym(A, ConjFun())
29172917

doc/stdlib/linalg.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
423423

424424
.. Docstring generated from Julia source
425425
426-
Compute the Bunch-Kaufman [Bunch1977]_ factorization of a real symmetric or complex Hermitian matrix ``A`` and return a ``BunchKaufman`` object. The following functions are available for ``BunchKaufman`` objects: ``size``\ , ``\``\ , ``inv``\ , ``issym``\ , ``ishermitian``\ .
426+
Compute the Bunch-Kaufman [Bunch1977]_ factorization of a real symmetric or complex Hermitian matrix ``A`` and return a ``BunchKaufman`` object. The following functions are available for ``BunchKaufman`` objects: ``size``\ , ``\``\ , ``inv``\ , ``issymmetric``\ , ``ishermitian``\ .
427427

428428
.. [Bunch1977] J R Bunch and L Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Mathematics of Computation 31:137 (1977), 163-179. `url <http://www.ams.org/journals/mcom/1977-31-137/S0025-5718-1977-0428694-0>`_\ .
429429
@@ -1093,7 +1093,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
10931093
10941094
Computes the solution ``X`` to the Sylvester equation ``AX + XB + C = 0``\ , where ``A``\ , ``B`` and ``C`` have compatible dimensions and ``A`` and ``-B`` have no eigenvalues with equal real part.
10951095

1096-
.. function:: issym(A) -> Bool
1096+
.. function:: issymmetric(A) -> Bool
10971097

10981098
.. Docstring generated from Julia source
10991099

test/arrayops.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ end
964964

965965
# Handle block matrices
966966
A = [randn(2,2) for i = 1:2, j = 1:2]
967-
@test issym(A.'A)
967+
@test issymmetric(A.'A)
968968
A = [complex(randn(2,2), randn(2,2)) for i = 1:2, j = 1:2]
969969
@test ishermitian(A'A)
970970

test/bitarray.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ b1 = triu(bitrand(n2, n1))
12011201

12021202
b1 = bitrand(n1,n1)
12031203
b1 |= b1.'
1204-
@check_bit_operation issym(b1) Bool
1204+
@check_bit_operation issymmetric(b1) Bool
12051205
@check_bit_operation ishermitian(b1) Bool
12061206

12071207
b1 = bitrand(n1)

test/blas.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ for elty in [Float32, Float64, Complex64, Complex128]
132132

133133
A = rand(elty,n,n)
134134
A = A + A.'
135-
@test issym(A)
135+
@test issymmetric(A)
136136
@test_approx_eq triu(BLAS.syr!('U',α,x,copy(A))) triu(A + α*x*x.')
137137
@test_throws DimensionMismatch BLAS.syr!('U',α,ones(elty,n+1),copy(A))
138138

test/linalg/arnoldi.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ let A6965 = [
102102
end
103103

104104
# Example from Quantum Information Theory
105-
import Base: size, issym, ishermitian
105+
import Base: size, issymmetric, ishermitian
106106

107107
type CPM{T<:Base.LinAlg.BlasFloat}<:AbstractMatrix{T} # completely positive map
108108
kraus::Array{T,3} # kraus operator representation
109109
end
110110
size(Phi::CPM)=(size(Phi.kraus,1)^2,size(Phi.kraus,3)^2)
111-
issym(Phi::CPM)=false
111+
issymmetric(Phi::CPM)=false
112112
ishermitian(Phi::CPM)=false
113113
import Base: *
114114
function *{T<:Base.LinAlg.BlasFloat}(Phi::CPM{T},rho::Vector{T})

test/linalg/bunchkaufman.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ debug && println("(Automatic) Bunch-Kaufman factor of indefinite matrix")
4949
end
5050
debug && println("Bunch-Kaufman factors of a pos-def matrix")
5151
for rook in (false, true)
52-
bc2 = bkfact(apd, :U, issym(apd), rook)
52+
bc2 = bkfact(apd, :U, issymmetric(apd), rook)
5353
@test_approx_eq inv(bc2) * apd eye(n)
5454
@test_approx_eq_eps apd * (bc2\b) b 150000ε
55-
@test ishermitian(bc2) == !issym(bc2)
55+
@test ishermitian(bc2) == !issymmetric(bc2)
5656
end
5757

5858
end

test/linalg/diagonal.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ for relty in (Float32, Float64, BigFloat), elty in (relty, Complex{relty})
168168
@test isa(similar(D, Int, (3,2)), Matrix{Int})
169169

170170
#10036
171-
@test issym(D2)
171+
@test issymmetric(D2)
172172
@test ishermitian(D2)
173173
if elty <: Complex
174174
dc = d + im*convert(Vector{elty}, ones(n))
175175
D3 = Diagonal(dc)
176-
@test issym(D3)
176+
@test issymmetric(D3)
177177
@test !ishermitian(D3)
178178
end
179179

0 commit comments

Comments
 (0)