6.7.14 MapToVector

6.7.14.1 Outline of the node

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

6.7.14.2 Necessary file

No files are required.

6.7.14.3 Usage

When to use

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

6.7.14.4 Input-output and property of the node

Input

INPUT

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

Output

OUTPUT

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

Parameter

Table 6.104: Parameter list of MapToVector 

Parameter name

Type

Default value

Unit

Description

METHOD

string 

min_key

 

The method to convert the Map<int, ObjectRef> type to the Vector<ObjectRef> type. Select min_key, max_key, average, or summation.

DEBUG

bool 

false

 

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

METHOD

: string  type. The method to convert the Map<int, ObjectRef> type to the Vector<ObjectRef> type. Select min_key, max_key, average, or summation. Selecting min_key or max_key outputs a Vector<float> or a Vector<complex<float> > whose key is the minimum or the maximum among the input Map<int, ObjectRef> . Selecting average or summation outputs a Vector<float> or a Vector<complex<float> > whose values are the summation of or the average of the values of the input Map<int, ObjectRef> . The default value is min_key.

DEBUG

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

6.7.14.5 Details of the node

Table 6.105: Conversion table of MapToVector 

INPUT

METHOD

OUTPUT

 
 

min_key

 

(1)

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

max_key

Vector<float> 

(2)

 

average

 

(3)

 

summation

 

(4)

 

min_key

   

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

max_key

Vector<complex<float> > 

 
 

average

   
 

summation

   

$<$example$>$

INPUT: Three input values, each value consists of a key and a 3 element vector.

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

OUTPUT(1): a 3 element vector for key 0.

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

OUTPUT(2): a 3 element vector for key 2.

  \[ \begin{tabular}{c} $<$ 7 ~ 8 ~ 9 $>$ \end{tabular} \]    

OUTPUT(3): a 3 element vector, the average of vectors whose key is from 0 to 2.

  \[ \begin{tabular}{c} $<$ 4 ~ 5 ~ 6 $>$ \end{tabular} \]    

OUTPUT(4): a 3 element vector, the summation of vectors whose key is from 0 to 2.

  \[ \begin{tabular}{c} $<$ 12 ~ 15 ~ 18 $>$ \end{tabular} \]