-
3.39.23
|
Functor for the SPSYMM projector. More...
Public Member Functions | |
function | spsymm (shape, k, varargin) |
Public Member Functions inherited from matfaust::proj::proj_gen | |
function | subsref (self, S) |
Additional Inherited Members | |
Protected Attributes inherited from matfaust::proj::proj_gen | |
Property | constraint |
Functor for the SPSYMM projector.
A, the image matrix of M, is such that A is symmetric and \( k \le \| A \|_0 \le k + 1, \| A\|_F = 1 \) (if normalized == True), assuming that \(\| M \|_0 >= k\).
Usage
spsymm(shape, k): returns a SPSYMM projector (functor), shape defines the size of the input matrix (e.g. [1, 10]), k defines the sparsity of the output matrix (k nnz coefficients).
spsymm(shape,k,'normalized', bool,'pos', bool): the optional parameters are set. By default both normalized and pos are false.
shape | vector of size 2, to define the size of the input matrix. |
k | the sparsity parameter (the number of nonzeros of the projection image. The result might be k+1 nonzeros in case of an odd number of nonzeros on the diagonal. |
'normalized',true | normalizes the projection image according to its Frobenius norm. |
'normalized',false | (the default) no normalization. |
'pos',true | skips the negative values (replaced by zero) of the input matrix. |
'pos',false | (the default) negative values are not skipped. |
proj | the spsymm projector. |
Example
function matfaust::proj::spsymm::spsymm | ( | shape | , |
k | , | ||
varargin | |||
) |