Skip to content

Commit 6f14a61

Browse files
committed
docs:Added/marked TODO items.
1 parent 8c057b0 commit 6f14a61

2 files changed

Lines changed: 29 additions & 19 deletions

File tree

README-work.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ zef install https://github.com/antononcube/Raku-Graph.git
4949
- Meaning it is for directed graphs.
5050
- Undirected graphs are represented as directed graphs.
5151
- I.e. with twice as many edges than necessary.
52-
- The current graph representation is with hash-of-hashes, (`adjacency-list`), that keeps from-to-weight relationships.
53-
- For example, `$g.adjacency-list<1><2>` gives the weight of the edge connecting vertex "1" to vertex "2".
52+
- The current graph representation is with hash-of-hashes, (`adjacency-map`), that keeps from-to-weight relationships.
53+
- For example, `$g.adjacency-map<1><2>` gives the weight of the edge connecting vertex "1" to vertex "2".
5454
- The vertexes are only strings.
5555
- Not a "hard" design decision.
5656
- More general vertexes can be imitated (in the future) with vertex tags.
@@ -227,12 +227,14 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
227227

228228
### Main, core features
229229

230+
- [X] DONE Rename the attribute `.adjacency-list` to `.adjacency-map`
231+
- Make is consistent with `Math::SparseMatrix`.
230232
- [ ] TODO Object methods
231233
- [X] DONE Str and gist methods
232234
- [X] DONE Deep copy
233235
- [X] DONE Creation from another graph.
234236
- [ ] TODO Ingest vertexes and edges of another `Graph` object
235-
- [ ] TODO Comparison: `eqv` and `ne`.
237+
- [ ] TODO Comparison: `eqv` and `ne`
236238
- [X] DONE Disjoint graphs
237239
- The graphs can be disjoint as long as the components have edges.
238240
- Related, the class `Graph` does supports "lone vertices."
@@ -338,7 +340,7 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
338340
- For given vertices and/or edges.
339341
- [X] DONE Make undirected
340342
- Can be implemented as `Graph.new($g, :!directed)`.
341-
- But maybe it is more efficient to directly manipulate `adjacency-list`.
343+
- But maybe it is more efficient to directly manipulate `adjacency-map`.
342344
- [X] DONE Make directed
343345
- It is not just a flag change of `$!directed`.
344346
- Implement the methods: `Whatever`, "Acyclic", "Random".
@@ -364,9 +366,12 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
364366

365367
- [X] DONE Construction of parameterized graphs
366368
- [X] DONE [Complete graphs](https://en.wikipedia.org/wiki/Complete_graph)
369+
- [X] DONE Single argument
370+
- [X] DONE List argument (for K-partite graphs)
367371
- [X] DONE [Cycle graphs](https://en.wikipedia.org/wiki/Cycle_graph)
368372
- [X] DONE [Hypercube graphs](https://en.wikipedia.org/wiki/Hypercube_graph)
369373
- [X] DONE [Grid graphs](https://en.wikipedia.org/wiki/Lattice_graph)
374+
- [X] DONE [Leaper graphs](https://mathworld.wolfram.com/LeaperGraph.html)
370375
- [X] DONE [Knight tour graphs](https://en.wikipedia.org/wiki/Knight%27s_graph)
371376
- [X] DONE [Star graphs](https://en.wikipedia.org/wiki/Star_graph)
372377
- [X] DONE Path graphs

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ zef install https://github.com/antononcube/Raku-Graph.git
4949
- Meaning it is for directed graphs.
5050
- Undirected graphs are represented as directed graphs.
5151
- I.e. with twice as many edges than necessary.
52-
- The current graph representation is with hash-of-hashes, (`adjacency-list`), that keeps from-to-weight relationships.
53-
- For example, `$g.adjacency-list<1><2>` gives the weight of the edge connecting vertex "1" to vertex "2".
52+
- The current graph representation is with hash-of-hashes, (`adjacency-map`), that keeps from-to-weight relationships.
53+
- For example, `$g.adjacency-map<1><2>` gives the weight of the edge connecting vertex "1" to vertex "2".
5454
- The vertexes are only strings.
5555
- Not a "hard" design decision.
5656
- More general vertexes can be imitated (in the future) with vertex tags.
@@ -156,22 +156,22 @@ $graph.mermaid(d=>'TD')
156156
```
157157
```mermaid
158158
graph TD
159+
2 --- 6
160+
6 --- 7
161+
3 --- 4
162+
2 --- 4
163+
4 --- 9
164+
10 --- 2
165+
10 --- 9
159166
12 --- 5
160167
1 --- 5
161-
4 --- 9
162-
2 --- 4
163-
3 --- 4
164168
3 --- 8
165169
2 --- 8
166-
2 --- 3
167-
6 --- 7
168170
1 --- 7
169171
2 --- 7
172+
2 --- 3
170173
11 --- 12
171174
12 --- 2
172-
10 --- 2
173-
2 --- 6
174-
10 --- 9
175175
```
176176

177177
Here we find the shortest path between nodes "1" and "4":
@@ -198,7 +198,7 @@ Here we find a [Hamiltonian path](https://en.wikipedia.org/wiki/Hamiltonian_path
198198
say 'find-hamiltonian-path : ' , $graph.find-hamiltonian-path();
199199
```
200200
```
201-
# find-hamiltonian-path : [8 3 4 9 10 2 6 7 1 5 12 11]
201+
# find-hamiltonian-path : [10 9 4 3 8 2 6 7 1 5 12 11]
202202
```
203203

204204
Here we find a cycle:
@@ -207,7 +207,7 @@ Here we find a cycle:
207207
say 'find-cycle : ' , $graph.find-cycle().sort({ $_.elems ~ ' ' ~ $_.join(' ') });
208208
```
209209
```
210-
# find-cycle : ([10 2 4 9 10])
210+
# find-cycle : ([2 3 8 2])
211211
```
212212

213213
Here we find all cycles in the graph:
@@ -272,12 +272,14 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
272272

273273
### Main, core features
274274

275+
- [X] DONE Rename the attribute `.adjacency-list` to `.adjacency-map`
276+
- Make is consistent with `Math::SparseMatrix`.
275277
- [ ] TODO Object methods
276278
- [X] DONE Str and gist methods
277279
- [X] DONE Deep copy
278280
- [X] DONE Creation from another graph.
279281
- [ ] TODO Ingest vertexes and edges of another `Graph` object
280-
- [ ] TODO Comparison: `eqv` and `ne`.
282+
- [ ] TODO Comparison: `eqv` and `ne`
281283
- [X] DONE Disjoint graphs
282284
- The graphs can be disjoint as long as the components have edges.
283285
- Related, the class `Graph` does supports "lone vertices."
@@ -335,7 +337,7 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
335337
- See shortest path.
336338
- [X] DONE Graph distance matrix
337339
- Again, requires choosing a matrix Raku class or package.
338-
- Just using a dense matrix for now.
340+
- Just using a dense matrix for now.
339341
- [X] DONE Longest shortest paths
340342
- [X] DONE Vertex eccentricity
341343
- [X] DONE Graph radius
@@ -383,7 +385,7 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
383385
- For given vertices and/or edges.
384386
- [X] DONE Make undirected
385387
- Can be implemented as `Graph.new($g, :!directed)`.
386-
- But maybe it is more efficient to directly manipulate `adjacency-list`.
388+
- But maybe it is more efficient to directly manipulate `adjacency-map`.
387389
- [X] DONE Make directed
388390
- It is not just a flag change of `$!directed`.
389391
- Implement the methods: `Whatever`, "Acyclic", "Random".
@@ -409,9 +411,12 @@ Most of the documentation notebooks show the graphs using both "JavaScript::D3"
409411

410412
- [X] DONE Construction of parameterized graphs
411413
- [X] DONE [Complete graphs](https://en.wikipedia.org/wiki/Complete_graph)
414+
- [X] DONE Single argument
415+
- [X] DONE List argument (for K-partite graphs)
412416
- [X] DONE [Cycle graphs](https://en.wikipedia.org/wiki/Cycle_graph)
413417
- [X] DONE [Hypercube graphs](https://en.wikipedia.org/wiki/Hypercube_graph)
414418
- [X] DONE [Grid graphs](https://en.wikipedia.org/wiki/Lattice_graph)
419+
- [X] DONE [Leaper graphs](https://mathworld.wolfram.com/LeaperGraph.html)
415420
- [X] DONE [Knight tour graphs](https://en.wikipedia.org/wiki/Knight%27s_graph)
416421
- [X] DONE [Star graphs](https://en.wikipedia.org/wiki/Star_graph)
417422
- [X] DONE Path graphs

0 commit comments

Comments
 (0)