4.3.3 Object

This data type is mainly used in the property settings of a node. It is used by nodes such as ChannelSelector , for example. Basically, it enables other data types aside from the already established ones such as int , float , string , bool  and subnet_param to be set as a property. As discussed in Section 4.3.2, Because primitive types are also included in data types that can be used as Object , in principle, all data types can be declared as an Object . However, since the input should be in text, it becomes limited only to data types where the input can be set as text. Currently, Vector  and Matrix can be set as text, but Map cannot. So, Map cannot be declared as Object yet.

Use the Tables 4.1, 4.2, 4.3 below as reference of the format in setting parameter values.

Table 4.1: Primitive Object Sample

Class

Value

Input

Remarks

Char

a

$<$Char a$>$

HARK does not normally use Char class

   

$<$Char a $>$

 

Int 

1

$<$Int 1$>$

The same with setting the parameter type to

   

$<$Int 1 $>$

int with a value of 1

Float 

1.0

$<$Float 1.0$>$

The same with setting the parameter type to

   

$<$Float 1.0 $>$

float with a value of 1.0

Double

1.0

$<$Double 1.0$>$

HARK does not normally use Double class

   

$<$Double 1.0 $>$

 

Complex $<$float $>$

1.0 + 2.0i

$<$Complex$<$float$>$ (1.0, 2.0)$>$

 
   

$<$Complex$<$float$>$ (1.0, 2.0) $>$

 

Complex$<$double$>$

1.0 + 2.0i

$<$Complex$<$double$>$ (1.0, 2.0)$>$

HARK does not normally use

   

$<$Complex$<$double$>$ (1.0, 2.0) $>$

Complex$<$double$>$ class

Bool 

false

$<$Bool 0$>$

The same with setting the parameter type to

   

$<$Bool 0 $>$

bool with a value of false

 

true

$<$Bool 1$>$

The same with setting the parameter type to

   

$<$Bool 1 $>$

bool with a value of true

String 

"Hello World!"

$<$String Hello World!$>$

The same with setting the parameter type to

     

with a value "Hello World!"

 

"Hello World! "

$<$String Hello World! $>$

Note that in this case the trailing space

     

is not ignored

nilObject 

 

$<$NilObject $>$

 


Table 4.2: Vector Object Sample

Class

Value

Input

Remarks

Vector<int> 

[1,2,3,4,5,6]

$<$Vector$<$int$>$ 1 2 3 4 5 6$>$

 
   

$<$Vector$<$int$>$ 1 2 3 4 5 6 $>$

 

Vector<float> 

[1.1,2.2,3.3

$<$Vector$<$float$>$ 1.1 2.2 3.3 4.4 5.5 6.6$>$

$<$float$>$ can be

 

4.4,5.5,6.6]

$<$Vector$<$float$>$ 1.1 2.2 3.3 4.4 5.5 6.6 $>$

omitted in case

   

$<$Vector 1.1 2.2 3.3 4.4 5.5 6.6$>$

the type is float 

   

$<$Vector 1.1 2.2 3.3 4.4 5.5 6.6 $>$

 

Vector$<$Char$>$

[’a’, ’b’]

$<$Vector$<$ObjectRef$>$ $<$Char a $>$

 
   

$<$Char b $>$ $>$

 

Vector$<$Int$>$

[1, 2, 3]

$<$Vector$<$ObjectRef$>$ $<$Int 1$>$ $<$Int 2$>$

 
   

$<$Int 3$>$ $>$

 

Vector$<$Float$>$

[1.1,2.2,3.3]

$<$Vector$<$ObjectRef$>$ $<$Float 1.1$>$

 
   

$<$Float 2.2$>$ $<$Float 3.3$>$ $>$

 

Vector$<$Double$>$

[1.1,2.2,3.3]

$<$Vector$<$ObjectRef$>$ $<$Double 1.1$>$

 
   

$<$Double 2.2$>$ $<$Double 3.3$>$ $>$

 

Vector$<$Complex$<$float$>$ $>$

[1.0 + 2.0i + 3.0

$<$Vector$<$ObjectRef$>$

 
 

+ 4.0i + 5.0 + 6.0i]

$<$Complex$<$float$>$ (1.0,2.0)$>$

 
   

$<$Complex$<$float$>$ (3.0,4.0)$>$

 
   

$<$Complex$<$float$>$ (5.0,6.0)$>$ $>$

 

Vector$<$Bool$>$

[false, true

$<$Vector$<$ObjectRef$>$ $<$Bool 0$>$

 
 

false, true]

$<$Bool 1$>$ $<$Bool 0$>$ $<$Bool 1$>$ $>$

 
Table 4.3: Matrix Object Sample

Class

Value

Input

Remarks

Matrix<int> 

[[1, 2, 3], [4, 5, 6]]

$<$Matrix$<$int$>$ $<$rows 2$>$ $<$col 3$>$

 
   

$<$data 1 2 3 4 5 6 $>$ $>$

 

Matrix<float> 

[[1.1, 2.2, 3.3],

$<$Matrix$<$float$>$ $<$rows 2$>$ $<$col 3$>$

$<$float$>$ can be

 

[4.4, 5.5, 6.6]]

$<$data 1.1 2.2 3.3 4.4 5.5 6.6 $>$ $>$

omitted in case

   

$<$Matrix $<$rows 2$>$ $<$col 3$>$

the type is float 

   

$<$data 1.1 2.2 3.3 4.4 5.5 6.6 $>$ $>$

 

Matrix$<$Char$>$

[[’a’,’b’], [’c’,’d’]]

$<$Matrix$<$ObjectRef$>$ $<$rows 2$>$ $<$col 2$>$

 
   

$<$data $<$Char a$>$ $<$Char b$>$ $<$Char c$>$ $<$Char d$>$ $>$ $>$

 

Matrix$<$Int$>$

[[1, 2, 3], [4, 5, 6]]

$<$Matrix$<$ObjectRef$>$ $<$rows 2$>$ $<$col 3$>$

 
   

$<$data $<$Int 1$>$ $<$Int 2$>$ $<$Int 3$>$ $<$Int 4$>$ $<$Int 5$>$

 
   

$<$Int 6$>$ $>$ $>$

 

Matrix$<$Float$>$

[[1.1, 2.2, 3.3],

$<$Matrix$<$ObjectRef$>$ $<$rows 2$>$ $<$col 3$>$

 
 

[4.4, 5.5, 6.6]]

$<$data $<$Float 1.1$>$ $<$Float 2.2$>$ $<$Float 3.3$>$

 
   

$<$Float 4.4$>$ $<$Float 5.5$>$ $<$Float 6.6$>$ $>$ $>$

 

Matrix$<$Double$>$

[[1.1, 2.2, 3.3],

$<$Matrix$<$ObjectRef$>$ $<$rows 2$>$ $<$col 3$>$

 
 

[4.4, 5.5, 6.6]]

$<$data $<$Double 1.1$>$ $<$Double 2.2$>$ $<$Double 3.3$>$

 
   

$<$Double 4.4$>$ $<$Double 5.5$>$ $<$Double 6.6$>$ $>$ $>$

 

Matrix$<$Complex$<$float$>$ $>$

[[1.1, 2.2i, 3.3, 4.4i],

$<$Matrix$<$ObjectRef$>$ $<$rows 2$>$ $<$col 3$>$

 
 

[5.5, 6.6i, 7.7, 8.8i]]

$<$data $<$Complex$<$Float$>$ (1.1, 2.2)$>$

 
   

$<$Complex$<$Float$>$ (3.3, 4.4)$>$

 
   

$<$Complex$<$Float$>$ (5.5, 6.6)$>$

 
   

$<$Complex$<$Float$>$ (7.7, 8.8)$>$ $>$ $>$