Generic List Extraction
Description
This operator is powerful and can extract one or more elements from an Input list based on various methods to form a new output list. It supports extraction by single index, index range, or Index list, and also supports Reverse extraction.
Scenarios
-
Precise Extraction: Quickly retrieve specific elements (e.g., the 1st, 5th, or 8th element) from a long list based on specified indices.
-
Range Extraction: Supports batch extraction of elements within a continuous interval, such as obtaining the first 5 elements (indices 0-4).
-
Remove Specific Elements: Allows removing specific elements from the list by index or specified value, while keeping the remaining elements unchanged.
-
Shuffling and Reorganization: Supports shuffling or reordering the list based on custom rules to achieve flexible data reorganization.
Inputs and Outputs
Inputs |
Input List: A list of any type. |
Outputs |
Extract Result: A new list containing all elements extracted according to the rules. |
Parameters
Extraction Method
Description |
Selects the core logic for element extraction. |
Tuning Instructions |
|
Parameter Range |
Values/Range:
Default: Single Element Extraction |
Index
Description |
Used in "Extract Single" mode to specify the index of the element to be extracted. |
Tuning Instructions |
Indices are zero-based. Negative indices are supported; for example, -1 refers to the first element from the end of the list, and -2 refers to the second-to-last element. |
Parameter Range |
Values/Range: [-10000, 10000] Default: 0 |
Min Index
Description |
Used in "Range Extraction" mode to define the start indices of the extraction range. |
Tuning Instructions |
For example, if the Min index is 2 and the Max index is 5, the four elements with indices "2, 3, 4, 5" will be extracted. |
Parameter Range |
Values/Range: [-10000, 10000] Default: 0 |
Max Index
Description |
Used in "Range Extraction" mode to define the end indices of the extraction range. |
Tuning Instructions |
For example, if the Min index is 2 and the Max index is 5, the four elements with indices "2, 3, 4, 5" will be extracted. |
Parameter Range |
Values/Range: [-10000, 10000] Default: 0 |
Index List
Description |
Used in "Extract by Index List" mode to provide a list containing the indices of all elements to be extracted. |
Tuning Instructions |
For example, entering [0, 5, 2] will extract the elements at indices 0, 5, and 2 from the original list in that order and compose them into a new list. |
Parameter Range |
Default: [] |