lamrg#

Functions

void slamrg(
    const INT  n1,
    const INT  n2,
    const f32* A,
    const INT  dtrd1,
    const INT  dtrd2,
          INT* index
);
void slamrg(const INT n1, const INT n2, const f32 *A, const INT dtrd1, const INT dtrd2, INT *index)#

SLAMRG will create a permutation list which will merge the elements of A (which is composed of two independently sorted sets) into a single set which is sorted in ascending order.

Parameters

in
n1

The length of the first sorted list.

in
n2

The length of the second sorted list.

in
A

Double precision array, dimension (n1+n2). The first n1 elements contain a list sorted in ascending or descending order. Likewise for the final n2 elements.

in
dtrd1

Stride through the first subset of A. 1 = ascending, -1 = descending.

in
dtrd2

Stride through the second subset of A. 1 = ascending, -1 = descending.

out
index

Integer array, dimension (n1+n2). On exit, a permutation with 0-based indices such that if B[i] = A[index[i]] for i=0,…,n1+n2-1, then B is sorted in ascending order.

Functions

void dlamrg(
    const INT  n1,
    const INT  n2,
    const f64* A,
    const INT  dtrd1,
    const INT  dtrd2,
          INT* index
);
void dlamrg(const INT n1, const INT n2, const f64 *A, const INT dtrd1, const INT dtrd2, INT *index)#

DLAMRG will create a permutation list which will merge the elements of A (which is composed of two independently sorted sets) into a single set which is sorted in ascending order.

Parameters

in
n1

The length of the first sorted list.

in
n2

The length of the second sorted list.

in
A

Double precision array, dimension (n1+n2). The first n1 elements contain a list sorted in ascending or descending order. Likewise for the final n2 elements.

in
dtrd1

Stride through the first subset of A. 1 = ascending, -1 = descending.

in
dtrd2

Stride through the second subset of A. 1 = ascending, -1 = descending.

out
index

Integer array, dimension (n1+n2). On exit, a permutation with 0-based indices such that if B[i] = A[index[i]] for i=0,…,n1+n2-1, then B is sorted in ascending order.