We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPD
Some options:
λ, (U1, U2, U3) = M
M::CPD
SVD
Base.iterate(S::SVD) = (S.U, Val(:S)) Base.iterate(S::SVD, ::Val{:S}) = (S.S, Val(:V)) Base.iterate(S::SVD, ::Val{:V}) = (S.V, Val(:done)) Base.iterate(S::SVD, ::Val{:done}) = nothing
norm(M::CPD) = sqrt(sum(abs2,M[I] for I in CartesianIndices(size(M))))
norm
*(a::Number, M::CPD)
/(M::CPD, a::Number)
normalize(M::CPD) = M/norm(M)
eachcomp
eachrow
eachcol
eachslice
arrange
permutedims
permute
getcomp
getindex
AbstractArray
extract
Array
Implementations in other packages/toolboxes:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some options:
λ, (U1, U2, U3) = M
whereM::CPD
For reference, this is how it's done for
SVD
:norm(M::CPD) = sqrt(sum(abs2,M[I] for I in CartesianIndices(size(M))))
norm
method forCPD
#44*(a::Number, M::CPD)
/(M::CPD, a::Number)
normalize(M::CPD) = M/norm(M)
eachcomp
) analogous toeachrow
,eachcol
,eachslice
.arrange
in Tensor Toolbox)permutedims
(analogous topermute
in Tensor Toolbox)getcomp
(analogous togetindex
forAbstractArray
s. see alsoextract
in Tensor Toolbox)Array
#57Implementations in other packages/toolboxes:
The text was updated successfully, but these errors were encountered: