pub struct BipartiteGameOptions {
pub directed: bool,
pub mode: NeighborMode,
pub allowed_edge_types: EdgeTypeSw,
pub edge_labeled: bool,
}Expand description
Parameters shared by the random bipartite generators
Graph::bipartite_game_gnp and Graph::bipartite_game_gnm.
The default is an undirected simple graph from the classic (edge-unlabeled) Erdős–Rényi model.
Fields§
§directed: boolWhether to generate a directed graph (default false).
mode: NeighborModeDirection of the edges in directed graphs (default NeighborMode::Out):
Out points from bottom (type false) to top (type true) vertices,
In the other way around; with All each edge direction is sampled
independently, so mutual edges may appear. Ignored if undirected.
allowed_edge_types: EdgeTypeSwAllowed edge types (default EdgeTypeSw::Simple): use
EdgeTypeSw::Multi to allow multi-edges. Self-loops are never
possible in a bipartite graph, so EdgeTypeSw::Loops is the same
as EdgeTypeSw::Simple.
edge_labeled: boolIf true, sample uniformly from ordered edge lists (edge-labeled
graphs) instead of the classic model (default false). Only
relevant when multi-edges are allowed: with simple graphs,
Graph::bipartite_game_gnm only shuffles the edge order and
Graph::bipartite_game_gnp fails with
ErrorKind::Unimplemented.
Implementations§
Source§impl BipartiteGameOptions
impl BipartiteGameOptions
Sourcepub fn with_directed(self, directed: bool, mode: NeighborMode) -> Self
pub fn with_directed(self, directed: bool, mode: NeighborMode) -> Self
Sourcepub fn with_allowed_edge_types(self, allowed: EdgeTypeSw) -> Self
pub fn with_allowed_edge_types(self, allowed: EdgeTypeSw) -> Self
Sets allowed_edge_types.
Sourcepub fn with_edge_labeled(self, edge_labeled: bool) -> Self
pub fn with_edge_labeled(self, edge_labeled: bool) -> Self
Sets edge_labeled.
Trait Implementations§
Source§impl Clone for BipartiteGameOptions
impl Clone for BipartiteGameOptions
Source§fn clone(&self) -> BipartiteGameOptions
fn clone(&self) -> BipartiteGameOptions
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 BipartiteGameOptions
Source§impl Debug for BipartiteGameOptions
impl Debug for BipartiteGameOptions
Source§impl Default for BipartiteGameOptions
impl Default for BipartiteGameOptions
impl Eq for BipartiteGameOptions
Source§impl PartialEq for BipartiteGameOptions
impl PartialEq for BipartiteGameOptions
Source§fn eq(&self, other: &BipartiteGameOptions) -> bool
fn eq(&self, other: &BipartiteGameOptions) -> bool
self and other values to be equal, and is used by ==.