6.7.25 ResizeMapVectorValues

6.7.25.1 Outline of the node

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

6.7.25.2 Necessary file

No files are required.

6.7.25.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.25.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.125: 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. 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.

DEBUG

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

6.7.25.5 Details of the node

$<$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, ~ $<$ 7 ~ 8 ~ 9 $>$ \} \end{tabular} \]    

OUTPUT:

  \[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 ~ 0 ~ 0 $>$ \} , & \{ 1, ~ $<$ 4 ~ 5 ~ 6 ~ 0 ~ 0 $>$ \} , & \{ 2, ~ $<$ 7 ~ 8 ~ 9 ~ 0 ~ 0 $>$ \} \end{tabular} \]    



PARAMETER:

  \[ \begin{tabular}{l} RESIZE\_ TYPE:RELATIVE, \\ SIZE:-1 \end{tabular} \]    

INPUT:

  \[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 $>$ \} , & \{ 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} \]    



PARAMETER:

  \[ \begin{tabular}{l} RESIZE\_ TYPE:ABSOLUTE, \\ SIZE:4 \end{tabular} \]    

INPUT:

  \[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 $>$ \} , & \{ 1, ~ $<$ 4 ~ 5 ~ 6 $>$ \} , & \{ 2, ~ $<$ 7 ~ 8 ~ 9 $>$ \} \end{tabular} \]    

OUTPUT:

  \[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 ~ 0 $>$ \} , & \{ 1, ~ $<$ 4 ~ 5 ~ 6 ~ 0 $>$ \} , & \{ 2, ~ $<$ 7 ~ 8 ~ 9 ~ 0 $>$ \} \end{tabular} \]    



PARAMETER:

  \[ \begin{tabular}{l} RESIZE\_ TYPE:ABSOLUTE, \\ SIZE:2 \end{tabular} \]    

INPUT:

  \[ \begin{tabular}{ccc} \{ 0, ~ $<$ 1 ~ 2 ~ 3 $>$ \} , & \{ 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} \]