pub struct MinimumCycleBasisOptions {
pub bfs_cutoff: Option<usize>,
pub complete: bool,
pub use_cycle_order: bool,
}Expand description
Options for Graph::minimum_cycle_basis.
The default computes an exact minimum cycle basis with each cycle listed
in cycle order (bfs_cutoff: None, complete: true, use_cycle_order: true),
the same defaults as the igraph R and Python interfaces.
use igraph::cycles::MinimumCycleBasisOptions;
let fast = MinimumCycleBasisOptions::default().with_bfs_cutoff(3).with_complete(false);
assert_eq!(fast.bfs_cutoff, Some(3));
assert!(fast.use_cycle_order);Fields§
§bfs_cutoff: Option<usize>None computes an exact minimum basis. Some(k) limits the depth of
the BFS trees used to generate candidate cycles, which can speed up
the computation substantially: then only the returned cycles of length
at most 2k + 1 are guaranteed to belong to some minimum basis.
Default: None.
complete: boolOnly used with a bfs_cutoff. If true, a
complete basis is still returned (its cycles longer than 2k + 1 may
not be minimal); if false, only the cycles of length at most 2k + 1
are returned, which is faster but does not span the whole cycle space.
Default: true.
use_cycle_order: boolIf true, the edge ids of each cycle are listed in the order they
appear along the cycle (at a small cost); if false, their order is
unspecified. Default: true.
Implementations§
Source§impl MinimumCycleBasisOptions
impl MinimumCycleBasisOptions
Sourcepub fn with_bfs_cutoff(self, k: usize) -> Self
pub fn with_bfs_cutoff(self, k: usize) -> Self
Sets bfs_cutoff to Some(k).
Sourcepub fn with_complete(self, complete: bool) -> Self
pub fn with_complete(self, complete: bool) -> Self
Sets complete.
Sourcepub fn with_cycle_order(self, use_cycle_order: bool) -> Self
pub fn with_cycle_order(self, use_cycle_order: bool) -> Self
Sets use_cycle_order.
Trait Implementations§
Source§impl Clone for MinimumCycleBasisOptions
impl Clone for MinimumCycleBasisOptions
Source§fn clone(&self) -> MinimumCycleBasisOptions
fn clone(&self) -> MinimumCycleBasisOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MinimumCycleBasisOptions
Source§impl Debug for MinimumCycleBasisOptions
impl Debug for MinimumCycleBasisOptions
Source§impl Default for MinimumCycleBasisOptions
impl Default for MinimumCycleBasisOptions
impl Eq for MinimumCycleBasisOptions
Source§impl PartialEq for MinimumCycleBasisOptions
impl PartialEq for MinimumCycleBasisOptions
Source§fn eq(&self, other: &MinimumCycleBasisOptions) -> bool
fn eq(&self, other: &MinimumCycleBasisOptions) -> bool
self and other values to be equal, and is used by ==.