bigs

Crates.iobigs
lib.rsbigs
version0.3.0
sourcesrc
created_at2020-11-24 21:31:35.810995
updated_at2022-03-27 13:32:17.091695
descriptionA bipartite graph sampler
homepage
repository
max_upload_size
id316033
size28,607
Maxime Tremblay (maxtremblay)

documentation

README

bigs

A BIpartite Graph Sampler

A tool to generate regular bipartite graphs. A bipartite graph is a set of variables and constraints (named like this because of SAT problems) together with a set of edges. Right now, only regular graphs can be sampled. That is, graphs with the same degree for all variables and the same for all constraints.

Example

use bigs::Sampler;
use rand::thread_rng;

let sampler = Sampler::builder()
    .number_of_variables(10)
    .number_of_constraints(6)
    .variable_degree(3)
    .constraint_degree(5)
    .build();

let graph = sampler.sample_with(&mut thread_rng());
let other_graph = sampler.sample_with(&mut thread_rng());
Commit count: 0

cargo fmt