用法:
permute(A::AbstractSparseMatrixCSC{Tv,Ti}, p::AbstractVector{<:Integer},
q::AbstractVector{<:Integer}) where {Tv,Ti}
雙邊置換 A
,返回 PAQ
( A[p,q]
)。 Column-permutation q
的長度必須與 A
的列數 ( length(q) == size(A, 2)
) 匹配。 Row-permutation p
的長度必須與 A
的行數 ( length(p) == size(A, 1)
) 匹配。
有關專家驅動程序和其他信息,請參閱
。permute!
例子
julia> A = spdiagm(0 => [1, 2, 3, 4], 1 => [5, 6, 7])
4×4 SparseMatrixCSC{Int64, Int64} with 7 stored entries:
1 5 ⋅ ⋅
⋅ 2 6 ⋅
⋅ ⋅ 3 7
⋅ ⋅ ⋅ 4
julia> permute(A, [4, 3, 2, 1], [1, 2, 3, 4])
4×4 SparseMatrixCSC{Int64, Int64} with 7 stored entries:
⋅ ⋅ ⋅ 4
⋅ ⋅ 3 7
⋅ 2 6 ⋅
1 5 ⋅ ⋅
julia> permute(A, [1, 2, 3, 4], [4, 3, 2, 1])
4×4 SparseMatrixCSC{Int64, Int64} with 7 stored entries:
⋅ ⋅ 5 1
⋅ 6 2 ⋅
7 3 ⋅ ⋅
4 ⋅ ⋅ ⋅
相關用法
- Julia SparseArrays.spdiagm用法及代碼示例
- Julia SparseArrays.nnz用法及代碼示例
- Julia SparseArrays.nonzeros用法及代碼示例
- Julia SparseArrays.sprand用法及代碼示例
- Julia SparseArrays.blockdiag用法及代碼示例
- Julia SparseArrays.spzeros用法及代碼示例
- Julia SparseArrays.sparsevec用法及代碼示例
- Julia SparseArrays.sprandn用法及代碼示例
- Julia SparseArrays.findnz用法及代碼示例
- Julia SparseArrays.dropzeros用法及代碼示例
- Julia SparseArrays.rowvals用法及代碼示例
- Julia SparseArrays.sparse用法及代碼示例
- Julia SparseArrays.issparse用法及代碼示例
- Julia Sys.BINDIR用法及代碼示例
- Julia Sys.KERNEL用法及代碼示例
- Julia Statistics.mean!用法及代碼示例
- Julia Sockets.getipaddr用法及代碼示例
- Julia Sockets.getnameinfo用法及代碼示例
- Julia SubString用法及代碼示例
- Julia Statistics.quantile!用法及代碼示例
- Julia SubString()用法及代碼示例
- Julia Statistics.quantile用法及代碼示例
- Julia Statistics.median用法及代碼示例
- Julia Sys.WORD_SIZE用法及代碼示例
- Julia Sort.searchsorted用法及代碼示例
注:本文由純淨天空篩選整理自julialang.org 大神的英文原創作品 SparseArrays.permute — Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。