List

This section describes operators belonging to the List category.

This page discusses:

Append Lists

Concatenates as many lists as you want thanks to its dynamic connectors.

Inputs

Name Type Description
List List The lists to concatenate.

Outputs

Name Type Description
List List Resulting list.

Build List

Creates lists containing items passed in inputs.

Inputs

Name Type Description
Item The item to include in the list.

Outputs

Name Type Description
List List —

Cluster by density

Clusters together vectors that are closely packed together (with minimum number of vectors and specified density).

Inputs

Name Type Description
Vectors Vector The list of vectors (supports all dimensions) or a list of points to cluster.
Min Number Integer The minimum number of vectors to form a cluster.
Max Radius Real The maximum distance between two vectors to be in the same cluster.
List List Structure the List as clusters.

Outputs

Name Type Description
Vectors Vector Cluster of vectors.

Cluster by number

Clusters vectors or points according in a given set of clusters according to their distance with each other.

Inputs

Name Type Description
Vectors Vector You can pass a list of vectors (supports all dimensions) or a list of points.
Clusters Nb Integer —
Iterations Integer Higher this value, the better the clustering result. But it has an influence of computation performances.
List List Structure the List as clusters.

Outputs

Name Type Description
Vectors Vector List of clustered points.

Combine

Creates structures with all possible combinations of the inputs.

Inputs

Name Type Description
Modes Integer 0: All 1: Half top 2: Half bottom.
Identity Boolean Remove identity.
A List —

Count

Count the number of occurrences of a given value in a list.

Inputs

Name Type Description
List List Input list.
Value Value to find.
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
Count Integer Number of occurrences found.

Deepen

Transforms any item in a list containing itself. Increases the structure depth by the leaves.

Inputs

Name Type Description
List List —

Outputs

Name Type Description
List List —

Deepen (advanced)

Increases the structure depth by lists at the given structure level.

Inputs

Name Type Description
List Structure List The list structure to add list levels to.
Working Level Integer The dimension to start the insertion. The dimension is the number of list level starting from the leaves (final items) of the structure. Dimension can also be negative value to start counting from the root of the structure (-1 is the root, -2 is the level under the root...).
Levels Number Integer The number of levels to add.

Outputs

Name Type Description
Result Structure List —

Filter By Type

Optionally converts and filters a collection based on the type of objects it contains.

Inputs

Name Type Description
List List List to filter.
Type Integer —
String —

Outputs

Name Type Description
Filtered List List —

First

Get the first item of the input list.

Inputs

Name Type Description
List List Input list.
Integer —
Boolean —

Outputs

Name Type Description
Object First Item of the input list.

Fit Cyclic

Extends the shortest lists by repeating their content until they fit the longest one.

Inputs

Name Type Description
A List —

Fit Longest

Extends the shortest lists by repeating their last item until they fit the longest one.

Inputs

Name Type Description
A List —

Fit Shortest

Truncates the longuest lists to fit the shortest one.

Inputs

Name Type Description
A List —

Flatten

Flattens any structure and return a simple list.

Inputs

Name Type Description
List List Input structure.

Outputs

Name Type Description
List List Resulting list.

Flatten (advanced)

Flattens several nested list levels in one list.

Inputs

Name Type Description
List Structure List The list structure to work on.
Working Level Integer The dimension to start flattening levels. The dimension is the number of levels counting from the leaves (the terminal items of the structure). Dimension can be a negative value to start counting from the root of the structure (-1 is the root, -2 is the level under the root...).
Levels Number Integer The number of levels to flatten. Can be a positive value or -1 to flatten all levels in the given direction.
Direction Integer Direction of the flattening, from starting level to the leaves or to the root of the structure.

Outputs

Name Type Description
Result Structure List —

Get Each Item

Returns each item of a list on a different output (formerly named Get Items).

Inputs

Name Type Description
List List Input list.
Index Integer Index to start from.
End Boolean True to start from the end of the list.

Outputs

Name Type Description
Out Dynamic outputs with holding each item.

Get Item

Returns the input list item at the given index.

Inputs

Name Type Description
List List Input list.
Index Integer Index of the item to get.
From end Boolean Get item starting from the end of the input list.

Outputs

Name Type Description
Item Item at the given index.

Get Item Path

Returns the item at the path given by a list of integers.

Inputs

Name Type Description
List List Input structure.
Index Integer List of indices representing the path.

Outputs

Name Type Description
Obj Item at the given path.

Get Items

Returns the input list items at the given indexes.

Inputs

Name Type Description
List List Input list.
Indexes Integer List of indexes of the items to get.
From end Boolean Get item starting from the end of the input list.

Outputs

Name Type Description
Items List Items at the given indexes.

Get Items If

Get items in a list conditionally to a list of boolean values. Can be used to filter a list.

Inputs

Name Type Description
List List List of values to filter.
Conditions Boolean List of boolean values that must match the first list. If a value matches with a true in this list, it is pushed in the output, otherwise it is not.

Outputs

Name Type Description
Items List Filtered list.

Group

Given a list (vals) and an integer (nb) smaller than this list's size, this node creates groups of nb elements from vals. For example : if vals.

Inputs

Name Type Description
List List —
Number Integer Size of the lists containing the subelements of vals.
Adjacent Boolean Boolean to decide whether the last element of a sublist is the first element of the following sublist.
Loop Boolean Boolean to decide whether vals first element should be also considered as its last element.

Outputs

Name Type Description
List of sublists List List of small groups from the list vals.

Index Of

Finds the position of an element in the list. Returns an empty value if element has not been found. To get the path of index of a given depth, adjust the dimension of input l.

Inputs

Name Type Description
List List List of values to search in. Dimension can be 1 get a simple index, or superior to 1 to get a path of index.
All Boolean If true, returns all the indices where the given value is found. Else returns only the first one.
Value Value to search.
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
Indices List Found indices.

Indices

Returns the index of each item of a list. If the first input dimension is set to more than one, the operator returns the path of each item. In this case (dimension > 1), the default result is a flat list of the items' paths, but it can keep the original list structure using the second input.

Inputs

Name Type Description
List List List or structure of items to get the indices of.
Structurized Boolean Only effective when first input dimension is set not to be 1. If false the items' paths are in a flat root list. If true, they are in a similar structure than the original one.

Outputs

Name Type Description
Indices List The list of indices or pathes.

Insert

Inserts items from a list in another one at a given index. You can specify period > 0 to have a periodic insertion.

Inputs

Name Type Description
List 1 List Original list.
List 2 List List to insert in the original.
Index Integer Index to start the insertion at.
Position Boolean Boolean to specify if the insertion is to be carried out at the original index list (TRUE) or if the insertion should take into account the latest appended elements and use the index of the output list (FALSE).
Period Integer Number of original items to leave between two insertions.

Outputs

Name Type Description
List 3 List Result list.

Intersect Lists

Returns the intersection of two lists (the list of common elements).

Inputs

Name Type Description
List List —
List 2 List —
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
List List —

Invert Order

Inverts the order of a list.

Inputs

Name Type Description
List 1 List —

Outputs

Name Type Description
List 2 List —

Last

Get the last item of the input list.

Inputs

Name Type Description
List List Input list.
Integer —
Boolean —

Outputs

Name Type Description
Object Last item of the input list.

Mix

Builds a list taking alternatively one item of each input list.

Inputs

Name Type Description
Complete with Last Boolean If a list is shorten than the others, complete with its last item.
List List Lists to mix.

Outputs

Name Type Description
List List Result list.

Odd Even

Splits the input list in two lists conainting the odd and the even items of the list.

Inputs

Name Type Description
List List —

Outputs

Name Type Description
Odd List —
Even List —

Polar Sort

Sorts a list of points by angle.

Inputs

Name Type Description
Points Point —
Polar Origin Point —
Direction Vector —
Order Boolean —

Outputs

Name Type Description
Sorted Points GeometricPoint —

Remove Duplicates

Keeps only the first value of each.

Inputs

Name Type Description
List List Original list.
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
List List Treated list.

Remove Empty

Removes empty values from a list.

Inputs

Name Type Description
List List —
Empty Values Boolean Removes the empty values.
Empty Lists Boolean Removes empty lists.
Replicate List Lists to remove the same positions as in the main list.

Outputs

Name Type Description
List List —

Remove Error

Removes error values from a list.

Inputs

Name Type Description
List List —
Filter Source filter, defines the operators that their errors will be removed from the list, if left empty all errors will be removed.
Replicate List Lists to remove the same positions as in the main list.

Outputs

Name Type Description
List List —

Remove First

Shortens a list by removing the first value.

Inputs

Name Type Description
List List Original list.

Outputs

Name Type Description
List List Modified list.

Remove Index

Removes an element given by an index from a list. To remove several items set Index input Dimension to 1.

Inputs

Name Type Description
List List Original list.
Index Integer Index of the element(s) you want to remove. Dimension can be 0 to remove one item or 1 to remove a list of items.
Replicate List Lists to remove the same positions as in the main list.

Outputs

Name Type Description
List List Modified list.

Remove Item

Remove a given object from a list. To remove several objects set Obj input Dimension to 1.

Inputs

Name Type Description
List List Original list.
Object Object(s) to find and remove. Dimension can be 0 to remove one item or 1 to remove a list of items.
All Boolean False to remove only the first occurrence, true to remove all.
From end Boolean Remove item starting from the end of the original list.
Mode Integer Compare objects or compare values.
Replicate List Lists to remove the same positions as in the main list.

Outputs

Name Type Description
List List Modified list.

Remove Last

Shortens a list by removing the last value.

Inputs

Name Type Description
List List Original list.

Outputs

Name Type Description
List List Modified list.

Remove List from List

Removes the common elements in two lists from the first list.

Inputs

Name Type Description
Ref List List —
List to remove List —
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
List List —

Repeat

Repeats elements in a list several times or repeats the whole list several times.

Inputs

Name Type Description
List List —
Elements Integer Number of elements to repeat.
Series Integer Number of series to repeat.

Outputs

Name Type Description
List 2 List —

Replace Item

Replaces a given value by another in a list. To replace several values set "Item to replace" and "Item to use" input Dimension to 1.

Inputs

Name Type Description
List List Original list.
Item to replace Value to find and replace. Dimension can be 0 to replace one item or 1 to replace a list of items with a list of values. Dimension of obj and rpl must be equal.
Item to use Replacing value. Dimension can be 0 to replace one item or 1 to replace a list of items with a list of values. Dimension of obj and rpl must be equal.
All Boolean False to replace only the first occurrence, True to replace all.
Mode Integer Compare objects or compare values.

Outputs

Name Type Description
List List Modified list.

Restructure

Populates a given structure with values from a flat list. The given structure and the list must have the same number of items.

Inputs

Name Type Description
Reference List Reference structure to populate.
List List Flat list providing values.

Outputs

Name Type Description
Resulting structure List —

Sample

Distributes alternatively the items of a list to a given number of lists.

Inputs

Name Type Description
List List Input list.
Number Integer Number of list to distribute to.

Outputs

Name Type Description
List List Resulting list of lists.

Sequence

Generates a sequence of a given number of values between ranges. You can repeat each value several times and you can repeat the whole series several times (in that case, each series is returned in a different list).

Inputs

Name Type Description
Inferior Bound Real Inferior range used to generate the sery.
Superior Bound Real Superior range used to generate the sery.
Number Integer Number of values in the sery (without consideration of repetition inputs).
With Bounds Boolean Include bounds or not.
Number of Each Value Integer Number of occurrence of each value in the sery.
Number of Series Integer Number of occurrences of the sery. Earch occurrence is returned in a separate list (so structure depth is increased).

Outputs

Name Type Description
List List Created structure.

Sequence by Step

Generates a sequence of values between ranges, separated by a given value. You can repeat each value several times and you can repeat the whole series several times (in that case, each series is returned in a different list).

Inputs

Name Type Description
Inferior Real Inferior range used to generate the sery.
Superior Real Superior range used to generate the sery.
Step Real Interval between consecutive values in the sery (without consideration of repetition inputs). It can be negative.
Bounds Boolean Include bounds or not.
Each Value Nb Integer Number of occurrence of each value in the sery.
Series Nb Integer Number of occurrences of the sery. Earch occurrence is returned in a separate list (so structure depth is increased).

Outputs

Name Type Description
List List Created structure.

Sequence by Step and Number

Creates a list of number values, starting from inf, with a given step.

Inputs

Name Type Description
Initial Real Starting value.
Step Real Step of the series.
Number Integer Number of wanted values in the output list.
Bounds Boolean If true, the list starts at inf + step instead of inf.

Outputs

Name Type Description
List List —

Set Items

Set a value at a given index.

Inputs

Name Type Description
List List Original list.
Object Object to set in the original list. Dimension can be 0 to set one item or 1 to set a list of items with a list of values. Dimension of obj and idx must be equal.
Index Integer Set object at a given index. Dimension can be 0 to set one item or 1 to set a list of items with a list of values. Dimension of obj and idx must be equal.

Outputs

Name Type Description
Output list List Modified list.

Shift

Shifts any value in a list by a given integer value. Can move the elements up (negative values) or down (positive values).

Inputs

Name Type Description
List 1 List —
Shift Integer —

Outputs

Name Type Description
List 2 List —

Shorten

Shortens a list by removing a given number of values at the start and at the end.

Inputs

Name Type Description
List List Original list.
Start Number Integer Number of items to remove at the start of the list.
End Number Integer Number of items to remove at the end of the list.

Outputs

Name Type Description
List List Modified list.

Shuffle List

Moves randomly the items of a list.

Inputs

Name Type Description
List List List to randomize.
Ratio Real Proportion of moving items. Example : 0.1 means 10% of moving items.
Distance Real Maximum moving distance for moving items. 0.1 and a list of 100 items means each moving items will move between 1 and 10 (100*0.1) items. Negative values mean the ratio input is used to control the distance.
Use Seed Boolean Use the seed input to keep stability of the randomization.
Seed Integer Seed used to keep stability when Use Seed is true.

Outputs

Name Type Description
Randomized List List —

Size

Returns the number of items of the input list.

Inputs

Name Type Description
List List Input list.

Outputs

Name Type Description
Size Integer Number of items in the input list.

Slice List

Slices a list at given indices, returning a list of sublists.

Inputs

Name Type Description
List List The list to slice.
Indices Integer The list of indices to split the list to.
Mode Integer Defines if the splits must take place, before indices, after indices or if indices should be replicated in both slices.

Outputs

Name Type Description
List of sublists List The resulting list of sublists.

Sort

Enables to sort one or more list considering a reference list and an expression. By default, it waits for a list of real values and sorts in an ascendant way. But you can sort any kind of list depending on the input expression and your sort criteria. You can add as many secondary lists as you want: their order will be modified the same way as the main sorted one.

Inputs

Name Type Description
Ref List —
List List —

Split List

Splits a list in two at a given position.

Inputs

Name Type Description
List List List to split.
Index Integer Index of the last item to put in the first list. Following items are in the second list.

Outputs

Name Type Description
List 1 List —
List 2 List —

Sublist

Extracts a sublist from a bigger list.

Inputs

Name Type Description
List List The list to extract the sublist from.
Start Index Integer Index to start from.
End Index Integer Index to end extraction.

Outputs

Name Type Description
Sublist List The resulting list.

Swap

Swaps the position of two values in a list. ( reorder ).

Inputs

Name Type Description
List List Original list.
Index 1 Integer First item to swap.
Index 2 Integer Second item to swap.

Outputs

Name Type Description
List List Modified list.

Transpose

Transposes the last two levels of the structure. For example, if you have [[1 2][3 4][5 6]], it gives you [[1 3 5][2 4 6]].

Inputs

Name Type Description
List List —

Outputs

Name Type Description
Transposed List List —