From 3c069bd23e911b67791ded6646d45f65efff200a Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Thu, 11 Jul 2024 21:21:22 +0200 Subject: [PATCH] fix readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fd2fc43..6a31d1a 100644 --- a/README.md +++ b/README.md @@ -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`. Alternatively, you can install the package into your Python environment by running -``` +```bash cd python 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 maximum weight matching contains two edges and has total weight 11. -``` +```python from mwmatching import maximum_weight_matching edges = [(0, 1, 3), (1, 2, 8), (1, 4, 6), (2, 3, 5), (2, 4, 7)] matching = maximum_weight_matching(edges) -print(matching) # prints [(2, 5), (3, 4)] +print(matching) # prints [(1, 4), (2, 3)] ``` ## C++