Skip to content

Commit 3e2c316

Browse files
authored
Adding links to graph methods.
1 parent c0b5253 commit 3e2c316

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ It is assumed that all vertices and edges belong to only one graph. Edges are di
116116
* `obh_graph.e`: List of edge objects.
117117

118118
Methods include:
119-
* `obj_graph.adjacency_list`: Returns the [adjacency list](https://en.wikipedia.org/wiki/Adjacency_list) of the graph, as a list of lists of vertex indices.
120-
* `obj_graph.adjacency_matrix`: Returns the [adjacency matrix](https://en.wikipedia.org/wiki/Adjacency_matrix) of the graph, as a matrix for which element _(i,j)_ indicates the number of edges (or the total weight of edges) from vertex _i_ to vertex _j_.
121-
* `obj_graph.all_distances`: Finds the distance from one vertex to every other vertex in the graph (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges.
122-
* `obj_graph.connected`: Determines whether the graph is (strongly) connected, or whether a given pair of vertices is (strongly) connected.
123-
* `obj_graph.distance`: Finds the distance between two vertices (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges.
124-
* `obj_graph.shortest_path`: Finds the shortest path between a pair of vertices (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges. Returns the cost of the path, the sequence of vertices, and the sequence of edges.
119+
* [`obj_graph.adjacency_list`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L48): Returns the [adjacency list](https://en.wikipedia.org/wiki/Adjacency_list) of the graph, as a list of lists of vertex indices.
120+
* [`obj_graph.adjacency_matrix`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L11): Returns the [adjacency matrix](https://en.wikipedia.org/wiki/Adjacency_matrix) of the graph, as a matrix for which element _(i,j)_ indicates the number of edges (or the total weight of edges) from vertex _i_ to vertex _j_.
121+
* [`obj_graph.all_distances`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L193): Finds the distance from one vertex to every other vertex in the graph (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges.
122+
* [`obj_graph.connected`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L248): Determines whether the graph is (strongly) connected, or whether a given pair of vertices is (strongly) connected.
123+
* [`obj_graph.distance`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L182): Finds the distance between two vertices (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges.
124+
* [`obj_graph.shortest_path`](https://github.com/adam-rumpf/game-maker-scripts/blob/master/objects/obj_graph/Create_0.gml#L73): Finds the shortest path between a pair of vertices (using [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)) based on the `cost` attributes of the edges. Returns the cost of the path, the sequence of vertices, and the sequence of edges.
125125
* `obj_vertex`: Vertex object. Attributes include:
126126
* `obj_vertex.e_in`: List of incoming edge objects.
127127
* `obj_vertex.e_out`: List of outgoing edge objects.

0 commit comments

Comments
 (0)