Composites
Composites combine multiple hypervectors into higher-level structures. Each composite type uses a different combination strategy, preserving different kinds of relationships between its members.
All composites follows the same contract (interface in Go and traits in Rust) and can be nested — a Set can contain Sparkles, Knots, or even other Sets.
Set
An unordered collection of concepts.
where is a special marker to distinguish a set from its individual members.
This mark is tuned for the domain, so that it will be shared among all sets within the same domain.
Use when: you need to represent “these things together” without order.
Check out code snippets from the API reference.
Sequence
An ordered collection.
where is a generic hypervector for positional encoding.
is a special marker to distinguish a sequence from its individual members. This mark is tuned for the domain, so that it will be shared among all sequences within the same domain.
Use when: order matters (e.g., words in a sentence, events in time).
Check out code snippets from the API reference.
Octopus
A key-value structure. Each key (a string) is converted to a Sparkle and bound with its corresponding value before bundling.
Use when: you need to represent structured records with named attributes.
Check out code snippets from the API reference.
Knot
The result of binding (multiplicative composition) of hypervectors.
Binding is reversible: given a Knot of A and B, you can recover A by releasing B (binding with B’s inverse).
Use when: you need a reversible association between concepts.
Check out code snippets from the API reference.
Parcel
The result of bundling (additive composition).
Unlike direct bundling, Parcel keeps tracking of its members for serialization and introspection.
Use when: you need a superposition of concepts, with optional weights.
Check out code snippets from the API reference.
Summary
| Type | Composition | Order? | Use Case |
|---|---|---|---|
| Set | Bundle + marker | No | Unordered groups |
| Sequence | Positional-bind + bundle + marker | Yes | Ordered lists |
| Octopus | Key-bind + bundle | Partial (by key) | Key-value records |
| Knot | Bind (multiply) | No | Reversible associations |
| Parcel | Bundle (add) | No | superpositions, weighted or unweighted |