6.7.30 VectorToMap

6.7.30.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.30.2 Necessary file

No files are required.

6.7.30.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.30.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.117: 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. The default value is false. Setting the value to trueoutputs the conversion status to the standard output.

6.7.30.5 Details of the node

Table 6.118: Conversion table of VectorToMap 

INPUT

OUTPUT

OUT_TYPE

 

type

size

type

size

   

Vector<float> 

 

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

{N}x1

map_of_vector

(1)

 

N

 

{1}xN

map_of_vectors

(2)

Vector<complex<float> > 

 

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

{N}x1

map_of_vector

 
     

{1}xN

map_of_vectors

 

$<$example$>$

INPUT: $<$ 1 2 3 4 5 $>$


OUTPUT(1): { 0, $<$ 1 2 3 4 5 $>$ }

OUTPUT(2): { 0, $<$ 1 $>$ }, { 1, $<$ 2 $>$ }, { 2, $<$ 3 $>$ }, { 3, $<$ 4 $>$ }, { 4, $<$ 5 $>$ }