6.7.24 ResizeMapMatrixValues

6.7.24.1 Outline of the node

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

6.7.24.2 Necessary file

No files are required.

6.7.24.3 Usage

When to use

This node is used to change the size of a Matrix , an ObjectRef of a Map<int, ObjectRef> . When reducing the size, truncate elements from the end of the Matrix as many as needed. When expanding the size, add 0s as elements to the end of the Matrix as many as needed.

6.7.24.4 Input-output and property of the node

Input

INPUT

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

Output

INPUT

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

Parameter

Table 6.119: Parameter list of ResizeMapMatrixValues 

Parameter name

Type

Default value

Unit

Description

RESIZE_TYPE

string 

RELATIVE

 

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

SIZE_ROW

int 

0

 

The number of rows to add to the row size or the row size with which replace the row size. The operation performed will depend on the RESIZE_TYPE parameter value.

SIZE_COLUMN

int 

0

 

The number of columns to add to the column size or the column size with which replace the column 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_ROW parameter value and the SIZE_COLUMN parameter value. Select RELATIVE or ABSOLUTE. RELATIVE resizes a Matrix by adding the SIZE_ROW parameter value and the SIZE_COLUMN parameter value to the Matrix size. ABSOLUTE resizes a Matrix by replacing the Matrix size with the SIZE_ROW parameter value and the SIZE_COLUMN parameter value. The default value is RELATIVE.

SIZE_ROW

: int  type. The number of rows to add to the row size or the row size with which replace the row size. The operation performed will depend on the RESIZE_TYPE parameter value.($*$) The default value is 0.

SIZE_COLUMN

: int  type. The number of columns to add to the column size or the column size with which replace the column size. The operation will depend on the RESIZE_TYPE parameter value.($*$)

DEBUG

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

6.7.24.5 ($*$)

When RELATIVE is selected for the RESIZE_TYPE parameter value, the Matrix size after change will be (A+SIZE_ROW, B+SIZE_COLUMN) for the Matrix whose size is (A, B). When the Matrix size after change is smaller than the size before change, the elements will be truncated from the end of the Matrix as many as needed. When the Matrix size after change is larger than the size before change, 0s will be added as many as needed from the end of the Matrix . When the Matrix size after change goes negative, an error will be generated. Output an empty Matrix when the Matrix size is 0.

6.7.24.6 Details of the node

$<$example$>$

PARAMETER:

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

INPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{cc} 1 & 2\\ 3 & 4 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{cc} 5 & 6\\ 7 & 8 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{cc} 9 & 10\\ 11 & 12 \end{array} \right] \end{array} \right\} \end{array} \]    

OUTPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{cccc} 1 & 2 & 0 & 0\\ 3 & 4 & 0 & 0\\ 0 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{cccc} 5 & 6 & 0 & 0\\ 7 & 8 & 0 & 0\\ 0 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{cccc} 9 & 10 & 0 & 0\\ 11 & 12 & 0 & 0\\ 0 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} \end{array} \]    



PARAMETER:

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

INPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{cc} 1 & 2\\ 3 & 4 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{cc} 5 & 6\\ 7 & 8 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{cc} 9 & 10\\ 11 & 12 \end{array} \right] \end{array} \right\} \end{array} \]    

OUTPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{c} 1 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{c} 5 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{c} 9 \end{array} \right] \end{array} \right\} \end{array} \]    



PARAMETER:

  \[ \begin{tabular}{l} RESIZE\_ TYPE:ABSOLUTE, \\ SIZE\_ ROW:1, \\ SIZE\_ COLUMN:5 \end{tabular} \]    

INPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{cc} 1 & 2\\ 3 & 4 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{cc} 5 & 6\\ 7 & 8 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{cc} 9 & 10\\ 11 & 12 \end{array} \right] \end{array} \right\} \end{array} \]    

OUTPUT:

  \[ \begin{array}{ccc} \left\{ \begin{array}{cc} 0, & \left[ \begin{array}{ccccc} 1 & 2 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 1, & \left[ \begin{array}{ccccc} 5 & 6 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} , & \left\{ \begin{array}{cc} 2, & \left[ \begin{array}{ccccc} 9 & 10 & 0 & 0 & 0 \end{array} \right] \end{array} \right\} \end{array} \]