Stephen Crowley
unread,Nov 24, 2023, 12:18:29 AM11/24/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to flint-devel
documentation for arb_mat_swap_rows
.. function:: void arb_mat_swap_rows(arb_mat_t mat, slong* perm, slong r, slong s)
Swaps two rows of a matrix.
This function swaps the rows indexed by `r` and `s` in the matrix `mat`. If a permutation array `perm` is provided, it also records the swap in this array. The function is designed to be efficient and only performs the swap if `r` and `s` are different.
:param arb_mat_t mat: The matrix in which rows are to be swapped.
:param slong* perm: An optional permutation array. If non-NULL, the function records the swap in this array. The array should have at least as many elements as there are rows in the matrix.
:param slong r: The index of the first row to swap.
:param slong s: The index of the second row to swap.
.. note::
The indices `r` and `s` are zero-based, meaning that the first row of the matrix is indexed by 0.
.. warning::
The function assumes that the indices `r` and `s` are valid indices for rows of the matrix `mat`. Passing invalid indices may lead to undefined behavior.
This function is part of the `arb` sublibrary of `flint`, which deals with matrix operations. It is typically used in algorithms that require row operations on matrices, such as Gaussian elimination or matrix inversion.