pub struct SubgraphSampler { /* private fields */ }Expand description
Subgraph sampling strategy that extracts connected subgraphs
Implementations§
Source§impl SubgraphSampler
impl SubgraphSampler
pub fn new(config: SamplingConfig) -> Self
Sourcepub fn random_walk_sample(
&mut self,
processor: &IncrementalGraphProcessor,
walk_length: usize,
) -> Result<SampledSubgraph>
pub fn random_walk_sample( &mut self, processor: &IncrementalGraphProcessor, walk_length: usize, ) -> Result<SampledSubgraph>
Random walk sampling starting from a random node
Sourcepub fn bfs_sample(
&mut self,
processor: &IncrementalGraphProcessor,
num_seeds: usize,
max_depth: usize,
) -> Result<SampledSubgraph>
pub fn bfs_sample( &mut self, processor: &IncrementalGraphProcessor, num_seeds: usize, max_depth: usize, ) -> Result<SampledSubgraph>
Breadth-First Search (BFS) sampling from multiple seed nodes
Sourcepub fn forest_fire_sample(
&mut self,
processor: &IncrementalGraphProcessor,
burn_probability: f64,
) -> Result<SampledSubgraph>
pub fn forest_fire_sample( &mut self, processor: &IncrementalGraphProcessor, burn_probability: f64, ) -> Result<SampledSubgraph>
Forest Fire sampling (spreads like fire with burning probability)
pub fn sampled_subgraph(&self) -> &SampledSubgraph
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubgraphSampler
impl RefUnwindSafe for SubgraphSampler
impl Send for SubgraphSampler
impl Sync for SubgraphSampler
impl Unpin for SubgraphSampler
impl UnsafeUnpin for SubgraphSampler
impl UnwindSafe for SubgraphSampler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more