LAMA
lama::JDSUtilsInterface::Sort Struct Reference

#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.

Member Typedef Documentation

typedef IndexType( * lama::JDSUtilsInterface::Sort::ilg2dlg)(IndexType dlg[], const IndexType numDiagonals, const IndexType ilg[], const IndexType numRows)

Compute dlg array from ilg array.

Parameters:
[out]dlgis the array with sizes of the columns
[in]numDiagonalsis size of dlg
[in]ilgis the array with sizes of the rows
[in]numRowsis 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

Parameters:
[out]inversePerm,size= n, will contain the inverse permutation
[in]perm,size= n, is input permuation of 0, ..., n-1
[in]nspecifies 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.

Parameters:
[in,out]arrayare the values to be sorted
[in,out]perm,whereperm[i] has the value of the original position
[in]nis 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

The documentation for this struct was generated from the following file: