new List()
Methods
add(current, value) → {List}
- Description:
Inserts a new symbol to the container.
- Adding twice the same current-value/next-value pair corresponds to adding their belief level
tau
.
- Adding twice the same current-value/next-value pair corresponds to adding their belief level
Parameters:
Name | Type | Description |
---|---|---|
current |
uint | The symbol after which the value is inserted. |
value |
Symbol | The symbol value to insert. |
Returns:
A reference to this associative map, allowing to chain add methods.
- Type
- List
erase(current, value) → {List}
- Description:
Erases a symbol in the chained.
- Adding twice the same current-value/next-value pair corresponds to adding their belief level
tau
.
- Adding twice the same current-value/next-value pair corresponds to adding their belief level
Parameters:
Name | Type | Description |
---|---|---|
current |
uint | The symbol after which the value is inserted. |
value |
Symbol | The symbol value to insert. |
Returns:
A reference to this associative map, allowing to chain add methods.
- Type
- List
getNext(current) → {Symbol}
- Description:
Returns the next element after a given symbol.
- It is a simple synonym of the get() function.
Parameters:
Name | Type | Description |
---|---|---|
current |
uint | The symbol current value next which element is to returnb. |
Returns:
value A reference to the stored value, available until program end.
- Type
- Symbol
getPrevious(current) → {Symbol}
- Description:
Returns the previous element before a given symbol.
- This function is of
O(list size)
, for this implementation, since it must scan the list.
- This function is of
Parameters:
Name | Type | Description |
---|---|---|
current |
uint | The symbol current value next which element is to returnb. |
Returns:
value A reference to the stored value, available until program end.
- Type
- Symbol