Group Data

Function Description

Groups elements in a data list through indices. Multiple input ports can be set to use one set of indices to perform grouping operations on multiple data lists.

Use Cases

No fixed application scenario.

Inputs

  • Indices: Index numbers used to group data.

  • Unnamed: Data list to be grouped. Acceptable input parameters include: PoseList, NumberList, StringList, Vector3DList, BoolList, IndexList.

Outputs

  • Unnamed: Data list after grouping.

Parameters

  • Port Count (1-16): Number of data lists to be grouped, range: [1,16].

  • Operation Layer: Specifies which layer of the input data list to operate on.

    For data structures like NumberList, StringList, Vector3DList, BoolList, IndexList, the operation layer is introduced as follows:

    [Layer 1 [Layer 0 xx,xx,xx…],[Layer 0 xx,xx,xx…] ]

    For PoseList, the operation layer is introduced as follows:

    [Layer 1 [Layer 0[x,y,z,qx,qy,qz,w]],[Layer 0[x,y,z,qx,qy,qz,w]] ]

Example 1

Extract 1, 2, 3, 12, 13, 14 from the number list [1,2,3,4,5,6,11,12,13,14,15,16], and group 1, 2, 3 as one group, and 12, 13, 14 as another group. Then the index list can be constructed as [[0,1,2],[7,8,9]], and select operation layer as 0.

Example 2

If you want to group [[1,2,3,4,5,6],[11,12,13,14,15,16]] as one group and [[20,21,22,23,24,25]] as another group from the number list [[1,2,3,4,5,6],[11,12,13,14,15,16],[20,21,22,23,24,25]], then the index list can be constructed as [[0,1],[2]], and select operation layer as 1.

If the index is [[0, 2], [1, 3, 4]] and the input data is [100, 20, 300, 40, 500], then the output is [[100, 300], [20, 40, 500]].