Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
Add the description of the import/export format
  • Loading branch information
xiaoxiae committed Apr 16, 2019
1 parent e76ab1f commit fc206a1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,19 @@ Before running the app, make sure to:

To launch the app, run `__main__.py` using Python.

## Import/export format
The app uses a simple format for importing and exporting graph.
It consists of a list of vertices of the graph.
The syntax is as follows, with the values in square brackets being optional:

`n1 [direction] n2 [w1] [w2]`, where
- `n1` and `n2` are labels of the nodes that are connected
- `[direction]` is only used in directed graphs, and could be either `->` (going from `n1` to `n2`), `<-` (going from `n2` to `n1`) and `<>` (going both ways)
- `[w1]` is the weight of the vertex from `n1` to `n2`
- `[w2]` is the weight of the vertex from `n2` to `n1`; is only used in the case of `n1 <> n2 w1 w2`

Examples of valid graphs can be found in the `graph examples/` folder.
Note that as long as the file is _not binary_, the extension doesn't matter.

## Sample Images
![Sample Images](https://i.imgur.com/7GU4K6a.png)

0 comments on commit fc206a1

Please sign in to comment.