Trait storage_proofs_core::drgraph::Graph [−][src]
pub trait Graph<H: Hasher>: Debug + Clone + PartialEq + Eq { type Key: Debug; fn parents(&self, node: usize, parents: &mut [u32]) -> Result<()>; fn size(&self) -> usize; fn degree(&self) -> usize; fn new(
nodes: usize,
base_degree: usize,
expansion_degree: usize,
porep_id: PoRepID,
api_version: ApiVersion
) -> Result<Self>; fn seed(&self) -> [u8; 28]; fn create_key(
&self,
id: &H::Domain,
node: usize,
parents: &[u32],
parents_data: &[u8],
exp_parents_data: Option<&[u8]>
) -> Result<Self::Key>; fn expected_size(&self) -> usize { ... } fn merkle_tree_depth<U: 'static + PoseidonArity>(&self) -> u64 { ... } }
Expand description
A depth robust graph.
Associated Types
Required methods
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.
Provided methods
fn expected_size(&self) -> usize
[src]
fn expected_size(&self) -> usize
[src]Returns the expected size of all nodes in the graph.
fn merkle_tree_depth<U: 'static + PoseidonArity>(&self) -> u64
[src]
fn merkle_tree_depth<U: 'static + PoseidonArity>(&self) -> u64
[src]Returns the merkle tree depth.