Class: Vector

Vector(a)

new Vector(a)

An "Initialization" Vector.
Parameters:
Name Type Description
a Object Input state (will map to `@data`.)
Source:

Methods

_identify(entity) → {Object}

Compute the `sha256` hash of the input entity's `@data` field.
Parameters:
Name Type Description
entity Object Input object; expects `@data`.
Source:
Returns:
Transformed entity with `@id` set to the `sha256` hash of `@data`.
Type
Object

_serialize(input) → {String}

_serialize is a placeholder, should be discussed.
Parameters:
Name Type Description
input String What to serialize. Defaults to `this['@data']`.
Source:
Returns:
- resulting string [JSON-encoded version of the local `@data` value.]
Type
String

add(input) → {Array}

Combine two vectors.
Parameters:
Name Type Description
input Vector [description]
Source:
Returns:
Native sequence.
Type
Array

compute(input) → {Vector}

Computes the next "step" for our current Vector. Analagous to `sum`. The top item on the stack is always the memory held at current position, so counts should always begin with 0.
Parameters:
Name Type Description
input Vector Input state, undefined if desired.
Source:
Returns:
- Makes this Vector chainable. Possible antipattern.
Type
Vector