See Concepts: Operators for the full overview.
bound = hv.bind(a, b)
released = hv.release(bound, b) # this will recover `a`
hv.equal(a, b) # hash equality
bound := hv.Bind(a, b)
recovered := hv.Release(bound, b) // this will recover `a`
eq := hv.Equal(a, b) // bool
#![allow(unused)]
fn main() {
let bound = operators::bind_hb(vec![a.clone(), b.clone()]); // Knot
let recovered = operators::release(&bound, &b); // this will recover `a`
let eq = hyper_binary::equal(&a, &b); // bool
}
Extracts one component from a binding: A⊘B=A⊗B−1
bound = hv.bind(role, filler)
recovered = hv.release(bound, role) # ≈ filler
bound := hv.Bind(role, filler)
recovered := hv.Release(bound, role) // ≈ filler
#![allow(unused)]
fn main() {
let bound = operators::bind_hb(vec![role.clone(), filler.clone()]);
let recovered = operators::release(&bound, &role);
}
p = hv.bundle(hv.Seed128(10, 1), a, b, c)
p := hv.Bundle(hv.NewSeed128(10, 1), a, b, c)
#![allow(unused)]
fn main() {
let p = operators::bundle(Seed128::new(10, 1), vec![a, b]);
}