LAMA
|
#include <LAMAInterface.hpp>
Public Types | |
typedef void(* | sortRows )(IndexType array[], IndexType perm[], const IndexType n) |
Stable sorting of values in array in descending order. | |
typedef void(* | setInversePerm )(IndexType inversePerm[], const IndexType perm[], const IndexType n) |
Compute the inverse permutation for a given permutation. | |
typedef IndexType(* | ilg2dlg )(IndexType dlg[], const IndexType numDiagonals, const IndexType ilg[], const IndexType numRows) |
Compute dlg array from ilg array. |
typedef IndexType( * lama::JDSUtilsInterface::Sort::ilg2dlg)(IndexType dlg[], const IndexType numDiagonals, const IndexType ilg[], const IndexType numRows) |
Compute dlg array from ilg array.
[out] | dlg | is the array with sizes of the columns |
[in] | numDiagonals | is size of dlg |
[in] | ilg | is the array with sizes of the rows |
[in] | numRows | is the number of rows, size of ilg |
The values in ilg must be descending. The same will be true for the output array dlg.
/code ilg 4 3 2 2 1 dlg 5 x x x x x 4 x x x x 2 x x 1 x /endcode
typedef void( * lama::JDSUtilsInterface::Sort::setInversePerm)(IndexType inversePerm[], const IndexType perm[], const IndexType n) |
Compute the inverse permutation for a given permutation.
inversePerm [ perm [i] ] == i , 0 <= i < n
[out] | inversePerm,size | = n, will contain the inverse permutation |
[in] | perm,size | = n, is input permuation of 0, ..., n-1 |
[in] | n | specifies the size of perm and inversePerm |
/code perm 2 5 1 4 6 3 0 inperm 6 2 0 5 3 1 4 /endcode
typedef void( * lama::JDSUtilsInterface::Sort::sortRows)(IndexType array[], IndexType perm[], const IndexType n) |
Stable sorting of values in array in descending order.
[in,out] | array | are the values to be sorted |
[in,out] | perm,where | perm[i] has the value of the original position |
[in] | n | is the number of values to be sorted |
array = 1 4 1 8 5 7 perm = 0 1 2 3 4 5 + array = 8 7 5 4 1 1 perm = 3 5 4 1 0 2