Array

Array

new Array()

Description:
  • Implements a macroscopic ersatz of a VSA indexed list.

    • An indexed list is created adding new index/value pairs.
    • It simply corresponds to an AssociativeMap with Number as key.
    • It is implemented via Bundling and Binding, without using a C++ std::vector.

Methods

add(index, value) → {Array}

Description:
  • Adds a new symbol pair to the container.

    • Adding twice the same index/value pair corresponds to adding their belief level tau.
Parameters:
Name Type Description
index uint

The symbol index to add or modify.

value Symbol

The symbol value to add.

Returns:

A reference to this associative map, allowing to chain add methods.

Type
Array

get(index) → {Symbol}

Description:
  • Returns an approximate value of the associative map by unbinding.

Parameters:
Name Type Description
index uint

The symbol index.

Returns:

value A reference to the stored value, available until program end.

Type
Symbol