bool_mat_trace
Synopsis
#include <flint/bool_mat.h>int bool_mat_trace(const bool_mat_t mat)sourceReturns the trace of the square matrix in the Boolean semiring: 1 if some diagonal entry is 1, and 0 otherwise (also for an empty matrix). Throws an exception if the matrix is not square.
Cite this page
The FLINT team, “bool_mat_trace (bool_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/bool_mat/bool_mat_trace.html (generated 2026-10-20).
@misc{flint-doc-bool-mat-bool-mat-trace,
author = {{The FLINT team}},
title = {{bool\_mat\_trace (bool\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/bool_mat/bool_mat_trace.html},
note = {Generated 2026-10-20}
}