@@ -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
158158graph TD
159+ 2 --- 6
160+ 6 --- 7
161+ 3 --- 4
162+ 2 --- 4
163+ 4 --- 9
164+ 10 --- 2
165+ 10 --- 9
15916612 --- 5
1601671 --- 5
161- 4 --- 9
162- 2 --- 4
163- 3 --- 4
1641683 --- 8
1651692 --- 8
166- 2 --- 3
167- 6 --- 7
1681701 --- 7
1691712 --- 7
172+ 2 --- 3
17017311 --- 12
17117412 --- 2
172- 10 --- 2
173- 2 --- 6
174- 10 --- 9
175175```
176176
177177Here 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
198198say ' 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
204204Here we find a cycle:
@@ -207,7 +207,7 @@ Here we find a cycle:
207207say ' 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
213213Here 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