6.7.37 VectorToMap

6.7.37.1 Outline of the node

Convert the Vector<ObjectRef> type to the Map<int, ObjectRef> type when the ObjectRef of the Vector<ObjectRef> given as the input is either the float type or the complex<float>  type.

6.7.37.2 Necessary file

No files are required.

6.7.37.3 Usage

When to use

This node is used to convert the VecObj type to the Map<int, ObjectRef> type when the ObjectRef of the Vector<ObjectRef> given as the input is either the float type or the complex<float>  type. Taking a Vector<float> as the input will output a Map$<$int , Vector<float> $>$. Taking a Vector<complex<float> > as the input will output a Map$<$int , Vector<complex<float> > $>$.

6.7.37.4 Input-output and property of the node

Input

INPUT

: any  type. Note that the supported data types are the Vector<float> type and the Vector<complex<float> > type.

Output

OUTPUT

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

Parameter

Table 6.139: Parameter list of VectorToMap 

Parameter name

Type

Default value

Unit

Description

OUTPUT_TYPE

string 

map_of_vector

 

The data type of the output data. Select map_of_vector or map_of_vectors.

DEBUG

bool 

false

 

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

OUTPUT_TYPE

: string  type. The data type of the output data. Select map_of_vector or map_of_vectors. Selecting map_of_vector outputs a Map whose key is 0 and whose ObjectRef is the Vector given as the input. Selecting map_of_vectors outputs Map as many as the number of elements of the Vector given as the input. The each Map。ヌs key is the index of the Vector and the each ObjectRef is a Vector consisting of an element corresponding to the index. The default value is map_of_vector.

DEBUG

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

6.7.37.5 Details of the node

Table 6.140: Conversion table of VectorToMap 

INPUT

OUT_TYPE

OUTPUT

 

type

size

 

type

size

 

Vector<float> 

 

map_of_vector

Map$<$int , Vector<float> $>$

{N}x1

(1)

 

N

map_of_vectors

 

{1}xN

(2)

Vector<complex<float> > 

 

map_of_vector

Map$<$int , Vector<complex<float> > $>$

{N}x1

 
   

map_of_vectors

 

{1}xN

 

$<$example$>$

INPUT:

  \[ \begin{tabular}{c} $<$ 1 ~ 2 ~ 3 ~ 4 ~ 5 $>$ \end{tabular} \]    

OUTPUT(1):

  \[ \begin{tabular}{c} \{ 0, ~ $<$ 1 ~ 2 ~ 3 ~ 4 ~ 5 $>$ \} \end{tabular} \]    

OUTPUT(2):

  \[ \begin{tabular}{ccccc} \{ 0, ~ $<$ 1 $>$ \} , & \{ 1, ~ $<$ 2 $>$ \} , & \{ 2, ~ $<$ 3 $>$ \} , & \{ 3, ~ $<$ 4 $>$ \} , & \{ 4, ~ $<$ 5 $>$ \} \end{tabular} \]