fix readme
This commit is contained in:
parent
5bc5804b67
commit
3c069bd23e
|
@ -20,7 +20,7 @@ The Python code is self-contained -- it has no dependencies outside the standard
|
||||||
To use the package, set your `PYTHONPATH` to the location of the package `mwmatching`.
|
To use the package, set your `PYTHONPATH` to the location of the package `mwmatching`.
|
||||||
Alternatively, you can install the package into your Python environment by running
|
Alternatively, you can install the package into your Python environment by running
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cd python
|
cd python
|
||||||
pip install .
|
pip install .
|
||||||
```
|
```
|
||||||
|
@ -32,11 +32,11 @@ Each edge is represented as a pair of vertex indices and the weight of the edge.
|
||||||
The example below finds a matching in a graph with 5 vertices and 5 edges.
|
The example below finds a matching in a graph with 5 vertices and 5 edges.
|
||||||
The maximum weight matching contains two edges and has total weight 11.
|
The maximum weight matching contains two edges and has total weight 11.
|
||||||
|
|
||||||
```
|
```python
|
||||||
from mwmatching import maximum_weight_matching
|
from mwmatching import maximum_weight_matching
|
||||||
edges = [(0, 1, 3), (1, 2, 8), (1, 4, 6), (2, 3, 5), (2, 4, 7)]
|
edges = [(0, 1, 3), (1, 2, 8), (1, 4, 6), (2, 3, 5), (2, 4, 7)]
|
||||||
matching = maximum_weight_matching(edges)
|
matching = maximum_weight_matching(edges)
|
||||||
print(matching) # prints [(2, 5), (3, 4)]
|
print(matching) # prints [(1, 4), (2, 3)]
|
||||||
```
|
```
|
||||||
|
|
||||||
## C++
|
## C++
|
||||||
|
|
Loading…
Reference in New Issue