mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-30 19:34:37 +00:00
Rename get_permutated_index to compute_shuffled_index. (#564)
To match name of equivalent function in v0.8.3 spec.
This commit is contained in:
committed by
Paul Hauner
parent
dd370b2e33
commit
a488c4dccd
@@ -1,21 +1,21 @@
|
||||
//! Provides list-shuffling functions matching the Ethereum 2.0 specification.
|
||||
//!
|
||||
//! See
|
||||
//! [get_permutated_index](https://github.com/ethereum/eth2.0-specs/blob/0.4.0/specs/core/0_beacon-chain.md#get_permuted_index)
|
||||
//! [compute_shuffled_index](https://github.com/ethereum/eth2.0-specs/blob/v0.8.3/specs/core/0_beacon-chain.md#compute_shuffled_index)
|
||||
//! for specifications.
|
||||
//!
|
||||
//! There are two functions exported by this crate:
|
||||
//!
|
||||
//! - `get_permutated_index`: given a single index, computes the index resulting from a shuffle.
|
||||
//! - `compute_shuffled_index`: given a single index, computes the index resulting from a shuffle.
|
||||
//! Runs in less time than it takes to run `shuffle_list`.
|
||||
//! - `shuffle_list`: shuffles an entire list in-place. Runs in less time than it takes to run
|
||||
//! `get_permutated_index` on each index.
|
||||
//! `compute_shuffled_index` on each index.
|
||||
//!
|
||||
//! In general, use `get_permutated_list` to calculate the shuffling of a small subset of a much
|
||||
//! In general, use `compute_shuffled_index` to calculate the shuffling of a small subset of a much
|
||||
//! larger list (~250x larger is a good guide, but solid figures yet to be calculated).
|
||||
|
||||
mod get_permutated_index;
|
||||
mod compute_shuffled_index;
|
||||
mod shuffle_list;
|
||||
|
||||
pub use get_permutated_index::get_permutated_index;
|
||||
pub use compute_shuffled_index::compute_shuffled_index;
|
||||
pub use shuffle_list::shuffle_list;
|
||||
|
||||
Reference in New Issue
Block a user