Change the size of a Matrix , 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 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.
Input
: Map$<$int , Matrix<int> $>$, Map$<$int , Matrix<float> $>$, or Map$<$int , Matrix<complex<float> > $>$ of Map<int, ObjectRef> type.
Output
: Map$<$int , Matrix<int> $>$, Map$<$int , Matrix<float> $>$, or Map$<$int , Matrix<complex<float> > $>$ of Map<int, ObjectRef> type.
Parameter
Parameter name |
Type |
Default value |
Unit |
Description |
RESIZE_TYPE |
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 |
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 |
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 |
false |
Enable or disable to output the conversion status to standard output. |
: 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.
: 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.
: 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.
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.
: bool type. Setting the value to trueoutputs the conversion status to the standard output. The default value is false.
$<$example$>$
INPUT:
\[ \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\} \] |
↓RESIZE_TYPE:RELATIVE, SIZE_ROW:1, SIZE_COLUMN:2
OUTPUT:
\[ \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\} \] |
INPUT:
\[ \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\} \] |
↓RESIZE_TYPE:RELATIVE, SIZE_ROW:-1, SIZE_COLUMN:-1
OUTPUT:
\[ \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\} \] |
INPUT:
\[ \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\} \] |
↓RESIZE_TYPE:ABSOLUTE, SIZE_ROW:1, SIZE_COLUMN:5
OUTPUT:
\[ \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\} \] |