model for the stable set problem
More...
Go to the source code of this file.
|
| V |
|
| E |
|
| model = ssp(V,E) |
|
| x = model.data |
|
model for the stable set problem
Definition in file ssp.py.
def ssp.make_data |
( |
|
n, |
|
|
|
prob |
|
) |
| |
make_data: prepare data for a random graph
Parameters:
- n: number of vertices
- prob: probability of existence of an edge, for each pair of vertices
Returns a tuple with a list of vertices and a list edges.
Definition at line 32 of file ssp.py.
ssp -- model for the stable set problem
Parameters:
- V: set/list of nodes in the graph
- E: set/list of edges in the graph
Returns a model, ready to be solved.
Definition at line 9 of file ssp.py.