Struct hyparview::NodeOptions [−][src]
pub struct NodeOptions<R> { pub rng: R, pub max_active_view_size: u8, pub max_passive_view_size: u8, pub shuffle_active_view_size: u8, pub shuffle_passive_view_size: u8, pub active_random_walk_len: u8, pub passive_random_walk_len: u8, }
Options for HyParView Node.
Fields
rng: R
Random number generator.
The default random number generator is ThreadRng
.
max_active_view_size: u8
Maximum number of nodes in the active view.
max_passive_view_size: u8
Maximum number of nodes in the passive view.
shuffle_active_view_size: u8
Protocol parameter that is called ka
in the paper.
shuffle_passive_view_size: u8
Protocol parameter that is called kp
in the paper.
active_random_walk_len: u8
Protocol parameter that is called ARWL
in the paper.
This is the initial TTL value for ForwardJoin
and Shuffle
messages.
passive_random_walk_len: u8
Protocol parameter that is called PRWL
in the paper.
If TTL is equal to the value,
Methods
impl NodeOptions<ThreadRng>
[src]
impl NodeOptions<ThreadRng>
impl<R: Rng> NodeOptions<R>
[src]
impl<R: Rng> NodeOptions<R>
pub const DEFAULT_MAX_ACTIVE_VIEW_SIZE: u8
DEFAULT_MAX_ACTIVE_VIEW_SIZE: u8 = 4
The default value of max_active_view_size
field.
pub const DEFAULT_MAX_PASSIVE_VIEW_SIZE: u8
DEFAULT_MAX_PASSIVE_VIEW_SIZE: u8 = 24
The default value of max_passive_view_size
field.
pub const DEFAULT_SHUFFLE_ACTIVE_VIEW_SIZE: u8
DEFAULT_SHUFFLE_ACTIVE_VIEW_SIZE: u8 = 2
The default value of shuffle_active_view_size
field.
pub const DEFAULT_SHUFFLE_PASSIVE_VIEW_SIZE: u8
DEFAULT_SHUFFLE_PASSIVE_VIEW_SIZE: u8 = 2
The default value of shuffle_passive_view_size
field.
pub const DEFAULT_ACTIVE_RANDOM_WALK_LEN: u8
DEFAULT_ACTIVE_RANDOM_WALK_LEN: u8 = 5
The default value of active_random_walk_len
field.
pub const DEFAULT_PASSIVE_RANDOM_WALK_LEN: u8
DEFAULT_PASSIVE_RANDOM_WALK_LEN: u8 = 2
The default value of passive_random_walk_len
field.
pub fn set_rng<S: Rng>(self, rng: S) -> NodeOptions<S>
[src]
pub fn set_rng<S: Rng>(self, rng: S) -> NodeOptions<S>
Sets the random number generator to rng
.
Trait Implementations
impl<R: Debug> Debug for NodeOptions<R>
[src]
impl<R: Debug> Debug for NodeOptions<R>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<R: Clone> Clone for NodeOptions<R>
[src]
impl<R: Clone> Clone for NodeOptions<R>
fn clone(&self) -> NodeOptions<R>
[src]
fn clone(&self) -> NodeOptions<R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for NodeOptions<ThreadRng>
[src]
impl Default for NodeOptions<ThreadRng>
Auto Trait Implementations
impl<R> Send for NodeOptions<R> where
R: Send,
impl<R> Send for NodeOptions<R> where
R: Send,
impl<R> Sync for NodeOptions<R> where
R: Sync,
impl<R> Sync for NodeOptions<R> where
R: Sync,