pack

Calling Sequence

Arguments

m-by-n real matrix of doubles, the entries of a list of block-diagonal symmetric matrices.
n is the number of matrices stored into A.

blocksizes

b-by-1 real matrix of doubles, the sizes of the blocks.

CA

p-by-n real matrix of doubles, a compressed representation of A.

sel

1-by-s real matrix of doubles, the indices of the rows of A
which have been selected in CA.

Description

This function takes as input argument a list of
block-diagonal matrices stored in the m-by-n matrix A.
Only the non-zero entries of the block-diagonal matrices are stored.
The integer n is the number of block-diagonal matrices,
while the integer m is the number of nonzero entries of
one single block-diagonal matrix.
The function removes the symmetric entries, and returns in CA
the compressed representation of A.

In the CA matrix, the symmetric entries stored in A
have been removed.
The rows which have been selected in CA are stored in the vector
sel, so that, on output, we have
CA == A(sel,:).

For example, the matrix

is stored as

[1; 2; 3; 4; 5; 6; 7; 8; 9; 10]

with blocksizes=[2,3,1].

This function is designed to be used when preparing the input arguments of the
semidef function.

Examples

In the following example, we compress a single block-diagonal symmetric matrix Z.
This is the example presented in "SP: Software for Semidefinite Programming, User's Guide, Beta Version",
November 1994, L. Vandenberghe and S. Boyd, 1994, on page 5.