(.js)
laraImport("lara.util.Accumulator");
(.lara)
import lara.util.Accumulator;
Classes:
new Accumulator()
Counts occurrences of tuples.
_keysPrivate(currentChain, chains)
_parseArguments()
Receives an array with the arguments of the previous function.
add()
Adds the tuple to the accumulator. Each time a tuple is added, the corresponding value increments by 1.
Alternatively, can also receive an array with the chain of values
constructor()
copy()
get()
Adds the value associated to the given tuple. If no value is defined for the given tuple, returns 0.
Alternatively, can also receive an array with the chain of values
keys()
Returns an array of arrays with keys that have a value set.