pub struct EdgeSampler { /* private fields */ }Expand description
Edge sampling strategy that selects representative edges
Implementations§
Source§impl EdgeSampler
impl EdgeSampler
pub fn new(config: SamplingConfig) -> Self
Sourcepub fn uniform_sample(
&mut self,
processor: &IncrementalGraphProcessor,
) -> Result<HashSet<(String, String)>>
pub fn uniform_sample( &mut self, processor: &IncrementalGraphProcessor, ) -> Result<HashSet<(String, String)>>
Uniform random edge sampling
Sourcepub fn weight_based_sample(
&mut self,
processor: &IncrementalGraphProcessor,
) -> Result<HashSet<(String, String)>>
pub fn weight_based_sample( &mut self, processor: &IncrementalGraphProcessor, ) -> Result<HashSet<(String, String)>>
Weight-based edge sampling (higher weight = higher probability)
pub fn sampled_edges(&self) -> &HashSet<(String, String)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EdgeSampler
impl RefUnwindSafe for EdgeSampler
impl Send for EdgeSampler
impl Sync for EdgeSampler
impl Unpin for EdgeSampler
impl UnwindSafe for EdgeSampler
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