IndexSort (FPScript)

21.09.2021

Sorts an index data set so that it becomes ascending.

Syntax

IndexSort(Index [ , RemoveDuplicates = TRUE ])

 

The syntax of the IndexSort function consists of the following parts:

Part

Description

Index

A data series with indices or a data matrix with 2D indices.

Permitted data structures are data series und data matrix. All real data types are permitted.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

RemoveDuplicates

TRUE, if duplicates are to be removed from the index.

Permitted data structures are scalar value. Supported data types are Boolean value.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value TRUE.

Remarks

The result always has the data type 64-bit integer.

The result is a data series or a data matrix with the Index sorted in ascending order. A 2D index is sorted in ascending order when the indices are counted off by row; for example: { {0, 0}, {0, 1}, {0, 2}, {1, 0}, {1, 1}, {1, 2} }. Index must contain values greater than or equal to zero.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

IndexSort({1, 2, 0})

Results in {0L, 1L, 2L}.

IndexSort({ {1, 1}, {0, 1}, {1, 0}, {0, 0} })

Results in { {0L, 0L}, {0L, 1L}, {1L, 0L}, {1L, 1L} }.

See Also

IndexOr Function

IndexAnd Function

IndexNot Function

IndexBefore Function

IndexAfter Function

IndexSegments Function

Event Isolation Analysis Object

Share article or send as email:

You might be interested in these articles