6.7.23 ResizeMapVectorValues

6.7.23.1 Outline of the node

Change the size of a Vector , an ObjectRef of a Map<int, ObjectRef> type.

6.7.23.2 Necessary file

No files are required.

6.7.23.3 Usage

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.

6.7.23.4 Input-output and property of the node

Input

INPUT

: Map$<$int , Vector<int> $>$, Map$<$int , Vector<float> $>$, or Map$<$intType, Vector<complex<float> > $>$ of Map<int, ObjectRef> type.

Output

OUPUT

: Map $<$int , Vector<int> $>$, Map$<$int , Vector<float> $>$, or Map$<$intType, Vector<complex<float> > $>$ of Map<int, ObjectRef> type.

Parameter

Table 6.111: Parameter list of ResizeMapVectorValues 

Parameter name

Type

Default value

Unit

Description

RESIZE_TYPE

string 

RELATIVE

 

The way of using the SIZE parameter value. Select RELATIVE or ABSOLUTE. Indicate the relative value and the absolute value, respectively.

SIZE

int 

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

bool 

false

 

Enable or disable to output the conversion status to standard output.

RESIZE_TYPE

: 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.

SIZE

: int type. 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.

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.

DEBUG

: bool type. Setting the value to trueoutputs the conversion status to the standard output. The default value is false.

6.7.23.5 Details of the node

$<$example$>$

INPUT: { 0, $<$ 1 2 3 $>$ }, { 1, $<$ 4 5 6 $>$ }, { 2, $<$ 7 8 9 $>$ }

↓RESIZE_TYPE:RELATIVE, SIZE:2

OUTPUT: { 0, $<$ 1 2 3 0 0 $>$ }, { 1, $<$ 4 5 6 0 0 $>$ }, { 2, $<$ 7 8 9 0 0 $>$ }

INPUT: { 0, $<$ 1 2 3 $>$ }, { 1, $<$ 4 5 6 $>$ }, { 2, $<$ 7 8 9 $>$ }

↓RESIZE_TYPE:RELATIVE, SIZE:-1

OUTPUT: { 0, $<$ 1 2 $>$ }, { 1, $<$ 4 5 $>$ }, { 2, $<$ 7 8 $>$ }

INPUT: { 0, $<$ 1 2 3 $>$ }, { 1, $<$ 4 5 6 $>$ }, { 2, $<$ 7 8 9 $>$ }

↓RESIZE_TYPE:ABSOLUTE, SIZE:4

OUTPUT: { 0, $<$ 1 2 3 0 $>$ }, { 1, $<$ 4 5 6 0 $>$ }, { 2, $<$ 7 8 9 0 $>$ }

INPUT: { 0, $<$ 1 2 3 $>$ }, { 1, $<$ 4 5 6 $>$ }, { 2, $<$ 7 8 9 $>$ }

↓RESIZE_TYPE:ABSOLUTE, SIZE:2

OUTPUT: { 0, $<$ 1 2 $>$ }, { 1, $<$ 4 5 $>$ }, { 2, $<$ 7 8 $>$ }