# End iterate

Collects results produced by an iterated part of a processing graph to a matrix or a table.

## Inputs

sync
An input that synchronizes the result output. This input is required so that the tool knows when every element related to the one that triggered an iteration has been received. One accumulated matrix/table will be sent for each object in this input. Usually, this input is connected to the sync output of the corresponding iteration. It is however possible to synchronize the output to any output that precedes it in a synchronized processing pipeline, even over nested iterations. The value of the sync input is ignored.
dynamicInputCount
The number of dynamic inputs.
discardEmptyElements
If true, empty elements (tables and matrices with zero rows) will not be counted as blocks and put to the blockSize output matrices. The number of rows in the blockSize matrix may thus be different from the number of input elements. If this flag is false, the number of rows in the blockSize output will be equal to the number of input elements, but the matrix may contain zeros. Note that the result matrix will be the same in both cases.
reservedElements
The estimated number or input elements. This is an optimization parameter that makes it possible to avoid unnecessary reallocation of memory. The tool estimates the number or rows required in the output by multiplying the number of rows in the first received element by reservedElements.
outputType
The type of the result outputs.
elementX
A matrix, table, or an element that will be put into the accumulated result. X ranges from 0 to dynamicInputCount - 1. Any number of elements may be provided for a single sync object. This input must come from a part of the processing graph that is iterated.

## Outputs

resultX
The accumulated matrix or table, one for each object in the sync input. The type of the output depends on the value of the outputType parameter and on the corresponding element input: if outputType is Matrix, the output will be either an integer matrix or a real matrix depending on the type of the first element received. If outputType is Table, the output will always be a table. If no elements were received during an iteration, either an empty integer matrix or an empty table will be sent depending on outputType.
blockSizeX
A matrix that specifies the number of rows each input element occupies in the output matrix/table. This is useful if the input elements have a variable number of rows.

Output types.

Enumerator
Auto

Output type will be automatically deduced from input. If the input is an integer or an integer matrix, the output type will be IntegerMatrix. If the input is a real number or a real-valued matrix, the output type will be RealMatrix. Otherwise, it will be Table. In Auto mode, different types may be written to each result output.

IntegerMatrix

Output will be an integer-valued matrix.

RealMatrix

Output will be a real-valued matrix.

Table

Output will be a VariantTable.