Encode
A number becomes a face with its value encoded as phase — value in, phase out, deterministic. A symbol gets a salted hash-based random signature.
Phasor is a Vector Symbolic Architecture (VSA) codec for .NET. Tokens — numbers and text — become bundles of unit complex numbers called phasors. Bind, unbind, bundle, and correlate form the complete algebra: arithmetic is encoding, not calculation. It's the base package the rest of the Evaluated Applications stack (AlgFormer, HoloDb, HoloVoxel) is built on.
dotnet add package EvaluatedApplications.Phasornumbers and symbols, one algebra
Symbolic and numeric data are usually kept separate: numbers flow through arithmetic circuits, symbols through lookup tables. Phasor bridges them. Bind two numbers on the linear band and you add them; bind on the log band and you multiply them. A symbol encodes to a fixed random phasor. Now both live in the same algebra — you can store them together, mix them, and read values back by correlation. This is the substrate for exact storage (no floating-point error in bundle/delete), similarity search at scale, and models that reason over both values and symbols with the same composition operators.
two operations
A number becomes a face with its value encoded as phase — value in, phase out, deterministic. A symbol gets a salted hash-based random signature.
Bind (complex multiply per component) builds relationships; bundle (sum) collects sets or superpositions; unbind (conjugate) extracts parts exactly; readout by correlation gives a dot-product score. On the linear band, bind is addition; on the log band, it's multiplication — there is no separate calculator, arithmetic is the composition.
pick the one that matches your workload
Fixed-width (256 reals) with a frozen identity prefix and a learned orbital tail. Built for neural models: the frozen part keeps values exact while the tail learns meaning downstream.
Configurable width, SIMD (Vector<double>), a planar layout (reals,
then imags) with a memoized number cache. Built for holographic storage and similarity search at scale.
Do not mix faces between the two profiles — they use different layouts and are not interchangeable inputs to the same op.
what you get
Bind, unbind, bundle and readout work the same way on numbers and symbols.
Bundle and unbind are exact; subtraction removes a contribution with no floating-point error.
Only .NET System and System.Numerics — no external libraries.
Works with ahead-of-time compilation and tree-shaking, no reflection tricks.
Symbols encode to repeatable, salted phasor signatures — reproducible, not cryptographic.
HoloCodec caches number faces to speed up repeated decodes.
minimal example
using Phasor;
// Encode a number and a symbol
double[] five = PhasorCodec.Encode("5");
double[] greeting = PhasorCodec.Encode("hello");
// Bind two numbers: adds them on the linear band
double[] fivePlusThree = PhasorCodec.Bind(five, PhasorCodec.Encode("3"));
int sum = PhasorCodec.DecodeSum(fivePlusThree, max: 10); // sum == 8
// Bundle (superpose) items to build a set, then unbind to extract one
double[] pair = PhasorCodec.Bundle(greeting, five);
double[] extracted = PhasorCodec.Unbind(pair, greeting); // extracted ~= fiveFor larger workloads or similarity search, use HoloCodec (SIMD, configurable width):
using Phasor;
var codec = new HoloCodec(dim: 1024); // 1024-dimensional, ~256 in the number band
double[] encoded = codec.Encode("hello");
double similarity = codec.Dot(encoded, another);Compatibility: .NET 8.0+, Windows/Linux/macOS, no platform-specific code, no dependency to bring your own model or storage layer. License: proprietary — every capability is free to use today; a license key is reserved for possible future advanced features, none gated currently.