Skip to main content

PrivacyHypergraph

Struct PrivacyHypergraph 

Source
pub struct PrivacyHypergraph {
    pub vertices: BTreeMap<String, HypergraphVertex>,
    pub hyperedges: BTreeMap<String, Hyperedge>,
    pub genesis: Option<String>,
    pub kk_factor: f64,
}
Expand description

The 5D-EZPH hypergraph.

Stores vertices (qubit tensor states) and hyperedges (Bell-state channels). All traversals are anonymized via DW3B mesh integration.

Fields§

§vertices: BTreeMap<String, HypergraphVertex>§hyperedges: BTreeMap<String, Hyperedge>§genesis: Option<String>

Genesis vertex ID

§kk_factor: f64

Kaluza-Klein metric perturbation factor (chaos-seeded)

Implementations§

Source§

impl PrivacyHypergraph

Source

pub fn new(chaos_seed: f64) -> Self

Create a new hypergraph with a genesis vertex.

The genesis vertex is the zero-state tensor: all five dimensions at 0.

Source

pub fn encode_vertex( &mut self, id: impl Into<String>, spatial: f64, temporal: f64, dp_epsilon: f64, phase_angle: f64, chaos_traj: f64, expiry_ms: u64, ) -> Result<String, PrivacyError>

Encode an event as a hypergraph vertex.

Dimensions are populated from:

  • spatial: cluster position hash
  • temporal: current timestamp (ms)
  • probabilistic: DP noise parameter ε
  • quantum: phase angle from chaos oracle
  • chaotic: Chua attractor trajectory value
Source

pub fn form_hyperedge( &mut self, id: impl Into<String>, vertex_ids: Vec<String>, chaos_perturbation: f64, ) -> Result<String, PrivacyError>

Form a hyperedge between ≥2 vertices with Kaluza-Klein modulation.

Simulates Bell-state entanglement: computes CHSH correlation via tensor product of vertex phase angles, perturbed by chaos.

Source

pub fn traverse_non_local( &self, start: &str, max_hops: usize, ) -> Result<Vec<String>, PrivacyError>

Traverse the hypergraph with non-local jumps (Bell violations).

Returns a path of vertex IDs with CHSH-validated edges. Edges with CHSH < threshold are skipped (classical locality).

Source

pub fn prove_non_locality(&self) -> Result<PrivacyProof, PrivacyError>

Generate a ZK proof of hypergraph state (non-local soundness).

Proof commits to the CHSH value of the highest-correlation edge, demonstrating non-local privacy without revealing vertex states.

Source

pub fn prune_expired(&mut self, now_ms: u64)

Prune expired vertices from the hypergraph.

Source

pub fn vertex_count(&self) -> usize

Returns the number of vertices.

Source

pub fn edge_count(&self) -> usize

Returns the number of hyperedges.

Trait Implementations§

Source§

impl Clone for PrivacyHypergraph

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrivacyHypergraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PrivacyHypergraph

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PrivacyHypergraph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.