M4RI 1.0.1
Functions
solve.h File Reference

System solving with matrix routines. More...

#include <stdio.h>
#include "misc.h"
#include "permutation.h"
#include "packedmatrix.h"

Go to the source code of this file.

Functions

void mzd_solve_left (mzd_t *A, mzd_t *B, const int cutoff, const int inconsistency_check)
 Solves A X = B with A and B matrices.
void mzd_pluq_solve_left (mzd_t *A, size_t rank, mzp_t *P, mzp_t *Q, mzd_t *B, const int cutoff, const int inconsistency_check)
 Solves (P L U Q) X = B.
void _mzd_pluq_solve_left (mzd_t *A, size_t rank, mzp_t *P, mzp_t *Q, mzd_t *B, const int cutoff, const int inconsistency_check)
 Solves (P L U Q) X = B.
void _mzd_solve_left (mzd_t *A, mzd_t *B, const int cutoff, const int inconsistency_check)
 Solves A X = B with A and B matrices.
mzd_tmzd_kernel_left_pluq (mzd_t *A, const int cutoff)
 Solve X for A X = 0.

Detailed Description

System solving with matrix routines.

Author:
Jean-Guillaume Dumas <Jean-Guillaume.Dumas@imag.fr>
Attention:
This file is currently broken.

Function Documentation

void _mzd_pluq_solve_left ( mzd_t A,
size_t  rank,
mzp_t P,
mzp_t Q,
mzd_t B,
const int  cutoff,
const int  inconsistency_check 
)

Solves (P L U Q) X = B.

A is an input matrix supposed to store both:

  • an upper right triangular matrix U
  • a lower left unitary triangular matrix L.

The solution X is stored inplace on B.

This version assumes that the matrices are at an even position on the RADIX grid and that their dimension is a multiple of RADIX.

Parameters:
AInput upper/lower triangular matrices.
rankis rank of A.
PInput row permutation matrix.
QInput column permutation matrix.
BInput matrix, being overwritten by the solution matrix X.
cutoffMinimal dimension for Strassen recursion (default: 0).
inconsistency_checkdecide whether or not to check for incosistency (faster without but output not defined if system is not consistent).

A is supposed to store L lower triangular and U upper triangular B is modified in place (Bi's in the comments are just modified versions of B) PLUQ = A 1) P B2 = B1 2) L B3 = B2 3) U B4 = B3 4) Q B5 = B4

FASTER without this check

update with the lower part of L

Default is to set the indefined bits to zero if inconsistency has been checked then Y2 bits are already all zeroes thus this clearing is not needed

void _mzd_solve_left ( mzd_t A,
mzd_t B,
const int  cutoff,
const int  inconsistency_check 
)

Solves A X = B with A and B matrices.

The solution X is stored inplace on B.

This version assumes that the matrices are at an even position on the RADIX grid and that their dimension is a multiple of RADIX.

Parameters:
AInput matrix.
BInput matrix, being overwritten by the solution matrix X.
cutoffMinimal dimension for Strassen recursion (default: 0).
inconsistency_checkdecide whether or not to check for incosistency (faster without but output not defined if system is not consistent).

B is modified in place (Bi's in the comments are just modified versions of B) 1) PLUQ = A 2) P B2 = B1 3) L B3 = B2 4) U B4 = B3 5) Q B5 = B4

mzd_t* mzd_kernel_left_pluq ( mzd_t A,
const int  cutoff 
)

Solve X for A X = 0.

If r is the rank of the nr x nc matrix A, return the nc x (nc-r) matrix X such that A*X == 0 and that the columns of X are linearly independent.

Parameters:
AMatrix.
cutoffMinimal dimension for Strassen recursion (default: 0).
Ignores offset atrtribute of packedmatrix.
See also:
mzd_pluq()
Returns:
X
void mzd_pluq_solve_left ( mzd_t A,
size_t  rank,
mzp_t P,
mzp_t Q,
mzd_t B,
const int  cutoff,
const int  inconsistency_check 
)

Solves (P L U Q) X = B.

A is an input matrix supposed to store both:

  • an upper right triangular matrix U
  • a lower left unitary triangular matrix L.

The solution X is stored inplace on B

This version assumes that the matrices are at an even position on the RADIX grid and that their dimension is a multiple of RADIX.

Parameters:
AInput upper/lower triangular matrices.
rankis rank of A.
PInput row permutation matrix.
QInput column permutation matrix.
BInput matrix, being overwritten by the solution matrix X.
cutoffMinimal dimension for Strassen recursion (default: 0).
inconsistency_checkdecide whether or not to check for incosistency (faster without but output not defined if system is not consistent).
void mzd_solve_left ( mzd_t A,
mzd_t B,
const int  cutoff,
const int  inconsistency_check 
)

Solves A X = B with A and B matrices.

The solution X is stored inplace on B.

Parameters:
AInput matrix (overwritten).
BInput matrix, being overwritten by the solution matrix X
cutoffMinimal dimension for Strassen recursion (default: 0).
inconsistency_checkdecide wether or not to check for incosistency (faster without but output not defined if system is not consistent).