KADABRA API

LARA API

LARA Common Language API

(.js)
laraImport("lara.util.Accumulator");

(.lara)
import lara.util.Accumulator;

Accumulator

Constructor

Accumulator

new Accumulator()

Counts occurrences of tuples.


Instance Members

_keysPrivate

_keysPrivate(currentChain, chains)

Parameters

currentChain: unknown
chains: unknown

_parseArguments

_parseArguments()

Receives an array with the arguments of the previous function.


add

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

Returns

Integer - the previous count of the added element

constructor

constructor()

copy

copy()

get

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

keys()

Returns an array of arrays with keys that have a value set.