pub struct WeightedCliqueOptions {
pub maximal: bool,
pub min_weight: Option<f64>,
pub max_weight: Option<f64>,
pub max_results: Option<usize>,
}Expand description
Options of Graph::weighted_cliques.
The default finds all cliques of any weight, without limits.
Cliquer only supports integer weights, so both bounds are truncated to
their integer part. Unlike in C, where a non-positive maximum means “no
bound”, here None means “no bound” and a maximum below 1 (which no
clique can meet, as vertex weights are at least 1) is rejected as an empty
range.
use igraph::cliques::WeightedCliqueOptions;
let opts = WeightedCliqueOptions::default().with_maximal(true).with_min_weight(7.0);
assert!(opts.maximal && opts.max_weight.is_none());Fields§
§maximal: boolOnly return maximal cliques (default false).
min_weight: Option<f64>Minimum total weight of a returned clique (inclusive), None for no
lower bound. Truncated to its integer part; values of at most 1 are
the same as no bound.
max_weight: Option<f64>Maximum total weight of a returned clique (inclusive), None for no
upper bound. Truncated to its integer part.
max_results: Option<usize>Stop after this many cliques were found, None for no limit
(Some(0) returns nothing).
Implementations§
Source§impl WeightedCliqueOptions
impl WeightedCliqueOptions
Sourcepub fn with_maximal(self, maximal: bool) -> Self
pub fn with_maximal(self, maximal: bool) -> Self
Sets the maximal field.
Sourcepub fn with_min_weight(self, weight: f64) -> Self
pub fn with_min_weight(self, weight: f64) -> Self
Sets the min_weight field.
Sourcepub fn with_max_weight(self, weight: f64) -> Self
pub fn with_max_weight(self, weight: f64) -> Self
Sets the max_weight field.
Sourcepub fn with_max_results(self, max_results: usize) -> Self
pub fn with_max_results(self, max_results: usize) -> Self
Sets the max_results field.
Sourcepub fn maximal(self, maximal: bool) -> Self
👎Deprecated: use with_maximal
pub fn maximal(self, maximal: bool) -> Self
use with_maximal
Sets the maximal field; use
with_maximal instead.
Sourcepub fn min_weight(self, weight: f64) -> Self
👎Deprecated: use with_min_weight
pub fn min_weight(self, weight: f64) -> Self
use with_min_weight
Sets the min_weight field; use
with_min_weight instead.
Sourcepub fn max_weight(self, weight: f64) -> Self
👎Deprecated: use with_max_weight
pub fn max_weight(self, weight: f64) -> Self
use with_max_weight
Sets the max_weight field; use
with_max_weight instead.
Sourcepub fn max_results(self, max_results: usize) -> Self
👎Deprecated: use with_max_results
pub fn max_results(self, max_results: usize) -> Self
use with_max_results
Sets the max_results field; use
with_max_results instead.
Trait Implementations§
Source§impl Clone for WeightedCliqueOptions
impl Clone for WeightedCliqueOptions
Source§fn clone(&self) -> WeightedCliqueOptions
fn clone(&self) -> WeightedCliqueOptions
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 WeightedCliqueOptions
Source§impl Debug for WeightedCliqueOptions
impl Debug for WeightedCliqueOptions
Source§impl Default for WeightedCliqueOptions
impl Default for WeightedCliqueOptions
Source§fn default() -> WeightedCliqueOptions
fn default() -> WeightedCliqueOptions
Source§impl PartialEq for WeightedCliqueOptions
impl PartialEq for WeightedCliqueOptions
Source§fn eq(&self, other: &WeightedCliqueOptions) -> bool
fn eq(&self, other: &WeightedCliqueOptions) -> bool
self and other values to be equal, and is used by ==.