sortDSMatrix: Sort a (possibly non-square) doubly stochastic matrix
Description
Sorts an arbitrary doubly stochastic \(N_1 \times N_2\) matrix A into the matrix \(A^\uparrow\) such that the induced checkerboard copula \(C(A^\uparrow)\) is stochastically increasing.
Usage
sortDSMatrix(A)
Value
The sorted version \(A^\uparrow\) of the matrix \(A\).
Arguments
A
A (possibly non-square) doubly stochastic matrix or (possibly non-square) checkerboard mass density.
Details
The algorithm to sort a doubly stochastic matrix \(A\) is given in Strothmann, Dette and Siburg (2022) <arXiv:2201.03329>.
Since this implementation does not depend on the appropriate scaling of the matrix \(A\), both doubly stochastic matrices and checkerboard mass densities are admissible inputs.