You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-11Lines changed: 21 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
3
3
A mathematical graph/network library written in PHP
4
4
5
-
> Note: While the APIs should be stable, this library is still considered *beta* software. Please see *Contributing* below for ways you can help out.
6
-
7
5
## Quickstart examples
8
6
9
7
Once [installed](#install), let's initialize a sample graph:
@@ -42,13 +40,25 @@ This library is built around the concept of [mathematical graph theory](http://e
42
40
43
41
Depending on how the edges are constructed, the whole graph can either be undirected, can be a [directed graph](http://en.wikipedia.org/wiki/Directed_graph) (aka digraph) or be a [mixed graph](http://en.wikipedia.org/wiki/Simple_graph#Mixed_graph). Edges are also allowed to form [loops](http://en.wikipedia.org/wiki/Loop_%28graph_theory%29) (i.e. an edge from vertex A pointing to vertex A again). Also, [multiple edges](http://en.wikipedia.org/wiki/Multiple_edges) from vertex A to vertex B are supported as well (aka parallel edges), effectively forming a [multigraph](http://en.wikipedia.org/wiki/Multigraph) (aka pseudograph). And of course, any combination thereof is supported as well. While many authors try to differentiate between these core concepts, this library tries hard to not impose any artificial limitations or assumptions on your graphs.
44
42
43
+
## Components
44
+
45
+
This library provides the core data structures for working with graphs, its vertices, edges and attributes.
46
+
47
+
There are several official components built on top of these structures to provide commonly needed functionality.
48
+
This architecture allows these components to be used independently and on demand only.
49
+
50
+
Following is a list of some highlighted components. A list of all official components can be found in the [graphp project](https://github.com/graphp).
51
+
45
52
### Graph drawing
46
53
47
-
The library supports visualizing graph images, including them into webpages, opening up images from within CLI applications and exporting them as PNG, JPEG or SVG file formats (among many others). Because [graph drawing](http://en.wikipedia.org/wiki/Graph_drawing) is a complex area on its own, the actual layouting of the graph is left up to the excelent [GraphViz](http://www.graphviz.org/) "Graph Visualization Software" and we merely provide some convenient APIs to interface with GraphViz.
54
+
This library is built to support visualizing graph images, including them into webpages, opening up images from within CLI applications and exporting them as PNG, JPEG or SVG file formats (among many others). Because [graph drawing](http://en.wikipedia.org/wiki/Graph_drawing) is a complex area on its own, the actual layouting of the graph is left up to the excelent [GraphViz](http://www.graphviz.org/) "Graph Visualization Software" and we merely provide some convenient APIs to interface with GraphViz.
55
+
56
+
See [graphp/graphviz](https://github.com/graphp/graphviz) for more details.
48
57
49
58
### Common algorithms
50
59
51
-
Besides graph drawing, one of the most common things to do with graphs is running algorithms to solve common graph problems. Therefor this library includes implementations for a number of commonly used graph algorithms:
60
+
Besides graph drawing, one of the most common things to do with graphs is running algorithms to solve common graph problems.
61
+
Therefor this library is being used as the basis for implementations for a number of commonly used graph algorithms:
52
62
53
63
* Search
54
64
* Deep first (DFS)
@@ -72,6 +82,8 @@ Besides graph drawing, one of the most common things to do with graphs is runnin
72
82
* Maximum matching
73
83
* Flow algorithm
74
84
85
+
See [graphp/algorithms](https://github.com/graphp/algorithms) for more details.
86
+
75
87
## Install
76
88
77
89
The recommended way to install this library is [through composer](http://getcomposer.org). [New to composer?](http://getcomposer.org/doc/00-intro.md)
@@ -84,12 +96,8 @@ The recommended way to install this library is [through composer](http://getcomp
84
96
}
85
97
```
86
98
87
-
Optional recommendation:
88
-
89
-
In order to be able to use the [graph drawing feature](#graph-drawing) you'll have to
90
-
install the [graphp/graphviz](https://github.com/graphp/graphviz) package and GraphViz itself (`dot` executable).
91
-
92
-
See [graphp/graphviz](https://github.com/graphp/graphviz) for details.
99
+
You may also want to install some of the [additional components](#components).
100
+
A list of all official components can be found in the [graphp project](https://github.com/graphp).
93
101
94
102
## Tests
95
103
@@ -105,7 +113,9 @@ $ php vendor/bin/phpunit
105
113
106
114
## Contributing
107
115
108
-
As stated above, this library is still considered beta software and requires some contributions. While constructing graphs, plotting them and running all algorithms on them has been tested with sample graphs, there's a fair chance that we're missing some special cases for *your* graphs - partly because of some implied assumptions and mostly because of a lack of basic unit tests.
116
+
This library comes with an extensive testsuite and is regularly tested and used in the *real world*.
117
+
Despite this, this library is still considered beta software and its API is subject to change.
118
+
The [changelog](CHANGELOG.md) lists all relevant information for updates between releases.
109
119
110
120
If you encounter any issues, please don't hesitate to drop us a line, file a bug report or even best provide us with a patch / pull request and/or unit test to reproduce your problem.
0 commit comments