MeatAxe: Matrix Sets

MeatAxe 2.4

- Main Page
- Related Pages
- Modules
- Data Structures

Data Structures | Functions
Matrix Sets

## Data Structures
class | MatrixSet_t
| A set of matrices. More...
## Functions
int | MsClean (const MatrixSet_t *set, Matrix_t *mat)
| Clean a Matrix with a Matrix Set.
int | MsCleanAndAppend (MatrixSet_t *set, Matrix_t *mat)
| Extend a Matrix Set.
int | MsIsValid (const MatrixSet_t *set)
| Check a Matrix Set.
MatrixSet_t * | MsAlloc ()
| Allocate a Matrix Set.
int | MsFree (MatrixSet_t *set)
| Free a Matrix Set.

## Function Documentation

MatrixSet_t* MsAlloc | ( |  | ) |

Allocate a Matrix Set.

This function allocates a new matrix set. The set is initially empty. When the set is no longer needed, if must be freed with MsFree().

Returns:
  Pointer to the new matrix set, or 0 on error.

int MsClean | ( | const MatrixSet_t * | set,
|  | Matrix_t * | mat
| ) |  |

Clean a Matrix with a Matrix Set.

This function cleans a matrix with a matrix set by adding suitable multiples of the members of the set to the matrix. When the function returns, all pivot positions of mat, as defined by set, are zero.

Parameters:

  set | Pointer to the matrix set.
  mat | Matrix to be cleaned.

Returns:
  0 on success, -1 on error.

int MsCleanAndAppend | ( | MatrixSet_t * | set,
|  | Matrix_t * | mat
| ) |  |

Extend a Matrix Set.

This function cleans a matrix with a matrix by calling MsClean(). If the resulting matrix is nonzero, it is added to the matrix set, and the function returns 0. Otherwise the return value is 1, indicating that the matrix is now zero.

Attention:
  Once a matrix has been added to a matrix set, i.e., after MsCleanAndAppend() returns zero, the application is no longer allowed to modify or free the matrix. The matrix will be freed, when the matrix set is destroyed.

Parameters:

  set | Pointer to the matrix set.
  mat | Matrix to be added.

Returns:
  0 if the matrix was added, 1 if the matrix was already in the span of set, -1 on error.

int MsFree | ( | MatrixSet_t * | set | ) |

Free a Matrix Set.

This function frees a matrix set. All matrices in the set are freed, too.

Parameters:

  set | Pointer to the matrix set.

Returns:
  0 on success, -1 on error.

int MsIsValid | ( | const MatrixSet_t * | set | ) |

Check a Matrix Set.

This function checks if the argument |set| is a pointer to a valid matrix. If the matrix set is valid, the function returns 1. Otherwise, an error is signalled and, if the error handler does not terminate the program, the function returns 0.

Parameters:

  set | Pointer to the matrix set.

Returns:
  1 if set points to a valid matrix set, 0 otherwise.