[−][src]Trait storage_proofs::drgraph::Graph
A depth robust graph.
Required methods
fn parents(&self, node: usize, parents: &mut [usize])
Returns a sorted list of all parents of this node. The parents may be repeated.
If a node doesn't have any parents, then this vector needs to return a vector where the first element is the requested node. This will be used as indicator for nodes without parents.
The parents
parameter is used to store the result. This is done fore performance
reasons, so that the vector can be allocated outside this call.
fn size(&self) -> usize
Returns the size of the graph (number of nodes).
fn degree(&self) -> usize
Returns the number of parents of each node in the graph.
fn new(
nodes: usize,
base_degree: usize,
expansion_degree: usize,
seed: [u32; 7]
) -> Self
nodes: usize,
base_degree: usize,
expansion_degree: usize,
seed: [u32; 7]
) -> Self
fn seed(&self) -> [u32; 7]
Provided methods
fn expected_size(&self) -> usize
Returns the expected size of all nodes in the graph.
fn merkle_tree<'a>(
&self,
data: &'a [u8]
) -> Result<MerkleTree<H::Domain, H::Function>>
&self,
data: &'a [u8]
) -> Result<MerkleTree<H::Domain, H::Function>>
Builds a merkle tree based on the given data.
fn merkle_tree_aux<'a>(
&self,
data: &'a [u8],
parallel: bool
) -> Result<MerkleTree<H::Domain, H::Function>>
&self,
data: &'a [u8],
parallel: bool
) -> Result<MerkleTree<H::Domain, H::Function>>
Builds a merkle tree based on the given data.
fn merkle_tree_depth(&self) -> u64
Returns the merkle tree depth.
fn forward(&self) -> bool
Implementors
impl<H: Hasher> Graph<H> for BucketGraph<H>
[src]
fn parents(&self, node: usize, parents: &mut [usize])
[src]
fn size(&self) -> usize
[src]
fn degree(&self) -> usize
[src]
fn seed(&self) -> [u32; 7]
[src]
fn new(
nodes: usize,
base_degree: usize,
expansion_degree: usize,
seed: [u32; 7]
) -> Self
[src]
nodes: usize,
base_degree: usize,
expansion_degree: usize,
seed: [u32; 7]
) -> Self