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
+13-12
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,9 @@ Once [installed](#install), let's initialize a sample graph:
26
26
```php
27
27
<?php
28
28
29
-
use \Fhaculty\Graph\Graph as Graph;
29
+
require __DIR__ . '/vendor/autoload.php';
30
30
31
-
require_once 'vendor/autoload.php';
32
-
33
-
$graph = new Graph();
31
+
$graph = new Fhaculty\Graph\Graph();
34
32
35
33
// create some cities
36
34
$rome = $graph->createVertex('Rome');
@@ -55,9 +53,9 @@ foreach ($rome->getVerticesEdgeFrom() as $vertex) {
55
53
56
54
## Features
57
55
58
-
This library is built around the concept of [mathematical graph theory](https://en.wikipedia.org/wiki/Graph_theory) (i.e. it is **not** a [charting](http://en.wikipedia.org/wiki/Chart) library for drawing a [graph of a function](http://en.wikipedia.org/wiki/Graph_of_a_function)). In essence, a graph is a set of *nodes* with any number of *connections* in between. In graph theory, [vertices](http://en.wikipedia.org/wiki/Vertex_%28graph_theory%29) (plural of vertex) are an abstract representation of these *nodes*, while *connections* are represented as *edges*. Edges may be either undirected ("two-way") or directed ("one-way", aka di-edges, arcs).
56
+
This library is built around the concept of [mathematical graph theory](https://en.wikipedia.org/wiki/Graph_theory) (i.e. it is **not** a [charting](https://en.wikipedia.org/wiki/Chart) library for drawing a [graph of a function](https://en.wikipedia.org/wiki/Graph_of_a_function)). In essence, a graph is a set of *nodes* with any number of *connections* in between. In graph theory, [vertices](https://en.wikipedia.org/wiki/Vertex_%28graph_theory%29) (plural of vertex) are an abstract representation of these *nodes*, while *connections* are represented as *edges*. Edges may be either undirected ("two-way") or directed ("one-way", aka di-edges, arcs).
59
57
60
-
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](https://en.wikipedia.org/wiki/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.
58
+
Depending on how the edges are constructed, the whole graph can either be undirected, can be a [directed graph](https://en.wikipedia.org/wiki/Directed_graph) (aka digraph) or be a [mixed graph](https://en.wikipedia.org/wiki/Mixed_graph). Edges are also allowed to form [loops](https://en.wikipedia.org/wiki/Loop_%28graph_theory%29) (i.e. an edge from vertex A pointing to vertex A again). Also, [multiple edges](https://en.wikipedia.org/wiki/Multiple_edges) from vertex A to vertex B are supported as well (aka parallel edges), effectively forming a [multigraph](https://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.
61
59
62
60
## Components
63
61
@@ -70,7 +68,7 @@ Following is a list of some highlighted components. A list of all official compo
70
68
71
69
### Graph drawing
72
70
73
-
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 excellent [GraphViz](http://www.graphviz.org/) "Graph Visualization Software" and we merely provide some convenient APIs to interface with GraphViz.
71
+
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](https://en.wikipedia.org/wiki/Graph_drawing) is a complex area on its own, the actual layouting of the graph is left up to the excellent [GraphViz](https://www.graphviz.org/) "Graph Visualization Software" and we merely provide some convenient APIs to interface with GraphViz.
74
72
75
73
See [graphp/graphviz](https://github.com/graphp/graphviz) for more details.
76
74
@@ -105,13 +103,13 @@ See [graphp/algorithms](https://github.com/graphp/algorithms) for more details.
105
103
106
104
## Install
107
105
108
-
The recommended way to install this library is [through Composer](https://getcomposer.org).
106
+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
109
107
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
110
108
111
109
This will install the latest supported version:
112
110
113
111
```bash
114
-
$ composer require clue/graph:^0.9.2
112
+
$ composer require clue/graph:^0.9.3
115
113
```
116
114
117
115
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -128,7 +126,7 @@ A list of all official components can be found in the [graphp project](https://g
128
126
129
127
This library uses PHPUnit for its extensive test suite.
130
128
To run the test suite, you first need to clone this repo and then install all
0 commit comments