Change the size of a Vector , an ObjectRef of a Map<int, ObjectRef> type.
No files are required.
When to use
This node is used to change the size of a Vector , an ObjectRef of a Map<int, ObjectRef> type. When reducing the size, truncate elements from the end of the Vector as many as needed. When expanding the size, add 0s as elements to the end of the Vector as many as needed.
Input
: Map$<$int , Vector<int> $>$, Map$<$int , Vector<float> $>$, or Map$<$intType, Vector<complex<float> > $>$ of Map<int, ObjectRef> type.
Output
: Map $<$int , Vector<int> $>$, Map$<$int , Vector<float> $>$, or Map$<$intType, Vector<complex<float> > $>$ of Map<int, ObjectRef> type.
Parameter
Parameter name |
Type |
Default value |
Unit |
Description |
RESIZE_TYPE |
RELATIVE |
The way of using the SIZE parameter value. Select RELATIVE or ABSOLUTE. Indicate the relative value and the absolute value, respectively. |
||
SIZE |
0 |
The number of elements to add to the Vector or the size with which replace the Vector size. The operation will depend on the RESIZE_TYPE parameter value. |
||
DEBUG |
false |
Enable or disable to output the conversion status to standard output. |
: string type. The way of using the SIZE parameter value. Select RELATIVE or ABSOLUTE. RELATIVE resizes a Vector by adding the SIZE parameter value to the Vector size. ABSOLUTE resizes a Vector by replacing the Vector size with the SIZE parameter value. The default value is RELATIVE.
: int type. The number of elements to add to the Vector or the size with which replace the Vector size. he operation will depend on the RESIZE_TYPE parameter value. When RELATIVE is selected for the RESIZE_TYPE parameter value, the Vector size after change will be (A+SIZE) for the Vector whose size is (A). When the Vector size after change is smaller than the size before change, the elements will be truncated from the end of the Vector as many as needed. When the Vector size after change is larger than the size before change, 0s will be added as many as needed. When the Vector size after change goes negative, an error will be generated. Outputs an empty Vector when the Vector size is 0.
: bool type. Setting the value to true outputs the conversion status to the standard output. The default value is false.
$<$example$>$
PARAMETER:
\[ \begin{tabular}{l} RESIZE\_ TYPE:RELATIVE, \\ SIZE:2 \end{tabular} \] |
INPUT:
\[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 $>$ \} , & \{ 1, ~ $<$ 4 ~ 5 ~ 6 $>$ \} , & \{ 2,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\} , & \{ 1, ~ $<$ 4 ~ 5 ~ 6 $>$ \} , & \{ 2, ~ $<$ 7 ~ 8 ~ 9 $>$ \} \end{tabular} \] |
OUTPUT:
\[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 $>$ \} , & \{ 1, ~ $<$ 4 ~ 5 $>$ \} , & \{ 2, ~ $<$ 7 ~ 8 $>$ \} \end{tabular} \] |