Class: Kernel

Kernel(name, pointeropt)

new Kernel(name, pointeropt)

Parameters:
Name Type Attributes Default Description
name string Name of the Kernel.
pointer number <optional>
null Pointer to an existing Kernel in memory.
Properties:
Name Type Description
name string The name of the kernel.
Source:

Methods

destroy()

Removes the C++ object from memory.
Source:

equation(…inputSymbols) → {string}

Gets the eqution that is represended by the kernel.
Parameters:
Name Type Attributes Description
inputSymbols string <repeatable>
Symbol for the inputs of the kernel. Must be at least two.
Source:
Returns:
Array with with the equation for every output of the kernel.
Type
string
Example
kernel.equation('a', 'b')
// could for example return ['(a+b)']

evaluate(…inputs) → {number|Array.<number>}

Calculates the result of the kernel with `inputs`.
Parameters:
Name Type Attributes Description
inputs number | Array.<number> <repeatable>
Input to the kernel. Must be at least two.
Source:
Returns:
The output of the kernel.
Type
number | Array.<number>
Examples
kernel.evaluate(1, 2, 3)
// could for example return 2
kernel.evaluate([1, 4], [2, 5], [3, 6])
// could for example return [3, 2]