ca_mat_lu_classical, ca_mat_lu_recursive, ca_mat_lu
#include <flint/ca_mat.h>int ca_mat_lu_classical(slong * rank, slong * P, ca_mat_t LU, const ca_mat_t A, int rank_check, ca_ctx_t ctx)sourceint ca_mat_lu_recursive(slong * rank, slong * P, ca_mat_t LU, const ca_mat_t A, int rank_check, ca_ctx_t ctx)sourceint ca_mat_lu(slong * rank, slong * P, ca_mat_t LU, const ca_mat_t A, int rank_check, ca_ctx_t ctx)sourceComputes a generalised LU decomposition A = PLU of the m \times n matrix A, writes the rank to rank and the row permutation to the array P of length m, and returns 1. Returns 0 if a pivot can neither be proved zero nor nonzero, in which case the outputs are meaningless.
If A is square and nonsingular, LU holds a unit lower triangular L (its diagonal not stored) and an upper triangular U. If A has rank r, U is in row echelon form with r nonzero rows and L is lower triangular, truncated to r columns with implicit ones on the first r diagonal entries. If rank_check is nonzero, the computation stops as soon as A is found to be rank-deficient, setting the rank to 0 and leaving LU undefined.
These are wrappers of gr_mat_lu_classical (Gaussian elimination), gr_mat_lu_recursive (block recursive elimination, which benefits from fast matrix multiplication) and gr_mat_lu_generic (an automatic choice).
The FLINT team, “ca_mat_lu_classical, ca_mat_lu_recursive, ca_mat_lu (ca_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca_mat/ca_mat_lu_classical.html (generated 2026-10-20).
@misc{flint-doc-ca-mat-ca-mat-lu-classical,
author = {{The FLINT team}},
title = {{ca\_mat\_lu\_classical, ca\_mat\_lu\_recursive, ca\_mat\_lu (ca\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ca_mat/ca_mat_lu_classical.html},
note = {Generated 2026-10-20}
}