pub struct SimplePathsOptions {
pub min_len: Option<usize>,
pub max_len: Option<usize>,
pub max_results: Option<usize>,
}Expand description
Length limits for Graph::get_all_simple_paths.
None means “no limit”; the default has no limits at all.
use igraph::paths::SimplePathsOptions;
let opts = SimplePathsOptions::default().with_max_len(3).with_max_results(10);
assert_eq!(opts.min_len, None);
assert_eq!(opts.max_len, Some(3));Fields§
§min_len: Option<usize>Minimum length (number of edges) of the returned paths.
max_len: Option<usize>Maximum length (number of edges) of the returned paths.
max_results: Option<usize>Stop after this many paths have been found.
Implementations§
Source§impl SimplePathsOptions
impl SimplePathsOptions
Sourcepub fn with_min_len(self, min_len: usize) -> Self
pub fn with_min_len(self, min_len: usize) -> Self
Sets the minimum path length.
Sourcepub fn with_max_len(self, max_len: usize) -> Self
pub fn with_max_len(self, max_len: usize) -> Self
Sets the maximum path length.
Sourcepub fn with_max_results(self, max_results: usize) -> Self
pub fn with_max_results(self, max_results: usize) -> Self
Sets the maximum number of returned paths.
Trait Implementations§
Source§impl Clone for SimplePathsOptions
impl Clone for SimplePathsOptions
Source§fn clone(&self) -> SimplePathsOptions
fn clone(&self) -> SimplePathsOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SimplePathsOptions
Source§impl Debug for SimplePathsOptions
impl Debug for SimplePathsOptions
Source§impl Default for SimplePathsOptions
impl Default for SimplePathsOptions
Source§fn default() -> SimplePathsOptions
fn default() -> SimplePathsOptions
Returns the “default value” for a type. Read more
impl Eq for SimplePathsOptions
Source§impl PartialEq for SimplePathsOptions
impl PartialEq for SimplePathsOptions
Source§fn eq(&self, other: &SimplePathsOptions) -> bool
fn eq(&self, other: &SimplePathsOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SimplePathsOptions
Auto Trait Implementations§
impl Freeze for SimplePathsOptions
impl RefUnwindSafe for SimplePathsOptions
impl Send for SimplePathsOptions
impl Sync for SimplePathsOptions
impl Unpin for SimplePathsOptions
impl UnsafeUnpin for SimplePathsOptions
impl UnwindSafe for SimplePathsOptions
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