Sort List and Output Index List

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Function

This Step sorts the input numeric list in ascending or descending order, and outputs the index positions of the sorted elements in the original list. This index list can be used for subsequent data processing in a specified order.

Usage Scenario

This Step is suitable for scenarios where various types of data need to be sorted in ascending or descending order. It is usually used in conjunction with Reorder Elements by Index to achieve custom sorting and reorganization of data.

Input and Output

Input

Input port Data type Description

Input List

Number[]

List of values to be sorted is input to this port.

Output

Output port Data type Description

Indices

Index[]

This port outputs the index of the sorted elements in the original list.

Parameter Description

Parameter Description

Ascending

Description: This parameter is used to control the sorting direction. When this option is selected, the robot will be sorted in ascending order; otherwise, the robot will be sorted in descending order.

Default value: Selected

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.