M4RI 1.0.1
Defines | Functions
pls.h File Reference

PLS and PLUQ matrix decomposition routines. More...

#include "packedmatrix.h"
#include "permutation.h"

Go to the source code of this file.

Defines

#define __M4RI_PLS_CUTOFF   MIN(524288, __M4RI_CPU_L2_CACHE >> 3)

Functions

rci_t mzd_pluq (mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)
 PLUQ matrix decomposition.
rci_t mzd_pls (mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)
 PLS matrix decomposition.
rci_t _mzd_pluq (mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)
 PLUQ matrix decomposition.
rci_t _mzd_pls (mzd_t *A, mzp_t *P, mzp_t *Qt, const int cutoff)
 PLS matrix decomposition.
rci_t _mzd_pluq_naive (mzd_t *A, mzp_t *P, mzp_t *Q)
 PLUQ matrix decomposition (naive base case).
rci_t _mzd_pls_naive (mzd_t *A, mzp_t *P, mzp_t *Qt)
 PLS matrix decomposition (naive base case).

Detailed Description

PLS and PLUQ matrix decomposition routines.

Author:
Clement Pernet <clement.pernet@gmail.com>

Define Documentation

#define __M4RI_PLS_CUTOFF   MIN(524288, __M4RI_CPU_L2_CACHE >> 3)

Crossover point for PLUQ factorization.


Function Documentation

rci_t _mzd_pls ( mzd_t A,
mzp_t P,
mzp_t Qt,
const int  cutoff 
)

PLS matrix decomposition.

See mzd_pls() for details.

Parameters:
AInput matrix
POutput row mzp_t matrix
QtOutput column mzp_t matrix
cutoffMinimal dimension for Strassen recursion.
See also:
mzd_pls()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
rci_t _mzd_pls_naive ( mzd_t A,
mzp_t P,
mzp_t Qt 
)

PLS matrix decomposition (naive base case).

See mzd_pls() for details.

Parameters:
AInput matrix
POutput row mzp_t matrix
QtOutput column mzp_t matrix
See also:
mzd_pls()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
rci_t _mzd_pluq ( mzd_t A,
mzp_t P,
mzp_t Q,
const int  cutoff 
)

PLUQ matrix decomposition.

See mzd_pluq() for details.

Parameters:
AInput matrix
POutput row mzp_t matrix
QOutput column mzp_t matrix
cutoffMinimal dimension for Strassen recursion.
See also:
mzd_pluq()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
rci_t _mzd_pluq_naive ( mzd_t A,
mzp_t P,
mzp_t Q 
)

PLUQ matrix decomposition (naive base case).

See mzd_pluq() for details.

Parameters:
AInput matrix
POutput row mzp_t matrix
QOutput column mzp_t matrix
See also:
mzd_pluq()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
rci_t mzd_pls ( mzd_t A,
mzp_t P,
mzp_t Q,
const int  cutoff 
)

PLS matrix decomposition.

Computes the PLS matrix decomposition using a block recursive algorithm.

Returns (P,L,S,Q) satisfying PLS = A where P is a permutation matrix of dimension m x m, L is m x r unit lower triangular and S is an r x n matrix which is upper triangular except that its columns are permuted, that is S = UQ for U r x n upper triangular and Q is a n x n permutation matrix. The matrix L and S are stored in place over A.

P and Q must be preallocated but they don't have to be identity permutations. If cutoff is zero a value is chosen automatically. It is recommended to set cutoff to zero for most applications.

This is the wrapper function including bounds checks. See _mzd_pls() for implementation details.

Parameters:
AInput m x n matrix
POutput row permutation of length m
QOutput column permutation matrix of length n
cutoffMinimal dimension for Strassen recursion.
See also:
_mzd_pls() _mzd_pluq() _mzd_pluq_mmpf() mzd_echelonize_pluq()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
rci_t mzd_pluq ( mzd_t A,
mzp_t P,
mzp_t Q,
const int  cutoff 
)

PLUQ matrix decomposition.

Returns (P,L,U,Q) satisfying PLUQ = A where P and Q are two permutation matrices, of dimension respectively m x m and n x n, L is m x r unit lower triangular and U is r x n upper triangular.

P and Q must be preallocated but they don't have to be identity permutations. If cutoff is zero a value is chosen automatically. It is recommended to set cutoff to zero for most applications.

The row echelon form (not reduced) can be read from the upper triangular matrix U. See mzd_echelonize_pluq() for details.

This is the wrapper function including bounds checks. See _mzd_pluq() for implementation details.

Parameters:
AInput m x n matrix
POutput row permutation of length m
QOutput column permutation matrix of length n
cutoffMinimal dimension for Strassen recursion.
See also:
_mzd_pluq() _mzd_pluq_mmpf() mzd_echelonize_pluq()
Ignores offset atrtribute of packedmatrix.
Returns:
Rank of A.
Examples:
testsuite/test_pluq.c.