new Bundling(nameopt, …symbol)
- Description:
Implements a macroscopic ersatz of a VSA bundling.
- A bundling or superposition is created adding new symbols.
- The bundling belief
tau = tau_1 tau_2 ...andsigma = sigma_1 + sigma_2 + ...is calculated from its member belief. - Note: a bundling can not be copied, use the clone() method instead.
Extends: Symbol, with all public methods available.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
name |
string |
<optional> |
An optional name. By default, a |
symbol |
Symbol |
<repeatable> |
Symbol added to the bundling from 0 to 8 in this implementation |
Methods
add(symbol)
- Description:
Adds a new symbol to the container.
Parameters:
| Name | Type | Description |
|---|---|---|
symbol |
Symbol | The symbol to add. |
erase(symbolopt)
- Description:
Erases a symbol in the container.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
symbol |
Symbol |
<optional> |
The symbol to erase.
|
getSorted(countopt) → {JSON}
- Description:
Returns the bundling symbols as a decreasing tau value sorted associative map.
- This corresponds to a microscopic implementation of a spike time activity rank sorting mechanism
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
count |
uint |
<optional> |
0
|
If |
Returns:
A std::vector<const Symbol*> temporary reference to the sorted list of string representation of symbols.
- Type
- JSON
get()
- Description:
Defines an iterator over the bundling symbols, used in a construct of the form:
for(auto it = bundling.Bundling::get().cbegin(); it != bundling.Bundling::get().cend(); it++) { const Symbol& symbol = *(it->second); ../.. }- This is NOT a VSA plausible operation (unless another List data structure is used) by a debugging function.
- The
bundling.Bundling::get().size()construct returns the number of symbols in this bundling.
Returns:
A const std::unordered_map < unsigned int, const Symbol* > reference, with symbols indexed by their IDs.