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.
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) → {Bundling}
- Description:
Adds a new symbol to the container.
Parameters:
Name | Type | Description |
---|---|---|
symbol |
Symbol | The symbol to add. |
Returns:
A reference to this bundling, allowing to chain add methods:
macrovsa::Bundling bundling;
bundling.add(symbol_1).add(symbol_2). ../..
- Type
- Bundling
erase(symbol) → {AssociativeMap}
- Description:
Erases a symbol in the container.
Parameters:
Name | Type | Description |
---|---|---|
symbol |
Symbol | The symbol to erase. |
Returns:
A reference to this associative map, allowing to chain add methods.
- Type
- AssociativeMap
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++) { // unsigned int symbolID = it->first; const Symbol& symbol it->second; ../.. }
- The
bundling.Bundling::get().size()
construct returns the number of symbols in this bundling. - The
bundling.Bundling::edit()
construct returns a modifiablestd::map <unsigned int, Symbol&>&
allowing to edit the underlying structure.
- The
Returns:
A const std::map < Symbol* >&
reference for bundling iteration.
asString() → {String}
- Description:
Returns the value as a string.
Returns:
A string of the form bundling_symbol [ symbol ... ]
.
- Type
- String