[][src]Trait storage_proofs::zigzag_graph::ZigZag

pub trait ZigZag: Debug + Clone + PartialEq + Eq {
    type BaseHasher: Hasher;
    type BaseGraph: Graph<Self::BaseHasher>;
    fn zigzag(&self) -> Self;
fn base_graph(&self) -> Self::BaseGraph;
fn expansion_degree(&self) -> usize;
fn reversed(&self) -> bool;
fn expanded_parents(&self, node: usize) -> Vec<usize>;
fn real_index(&self, i: usize) -> usize;
fn new_zigzag(
        nodes: usize,
        base_degree: usize,
        expansion_degree: usize,
        seed: [u32; 7]
    ) -> Self; }

Associated Types

Loading content...

Required methods

fn zigzag(&self) -> Self

zigzag returns a new graph with expansion component inverted and a distinct base DRG graph -- with the direction of drg connections reversed. (i.e. from high-to-low nodes). The name is 'weird', but so is the operation -- hence the choice.

fn base_graph(&self) -> Self::BaseGraph

Constructs a new graph.

fn expansion_degree(&self) -> usize

fn reversed(&self) -> bool

fn expanded_parents(&self, node: usize) -> Vec<usize>

fn real_index(&self, i: usize) -> usize

fn new_zigzag(
    nodes: usize,
    base_degree: usize,
    expansion_degree: usize,
    seed: [u32; 7]
) -> Self

Loading content...

Implementors

impl<'a, H, G> ZigZag for ZigZagGraph<H, G> where
    H: Hasher,
    G: Graph<H>, 
[src]

type BaseHasher = H

type BaseGraph = G

fn zigzag(&self) -> Self[src]

To zigzag a graph, we just toggle its reversed field. All the real work happens when we calculate node parents on-demand.

Loading content...