More graphs and primes!

This commit is contained in:
mindfulminun committed 2022-10-18 23:26:30 -05:00
1 parent e273396609
commit a7dc28d86d
6 files changed
+301 -157

No files matched your search

+1 -17
View File
@@ -1,19 +1,3 @@
import { Graph } from '../tools/graph.ts'
import { g1, g2 } from '../tools/graph/_graph-samples.ts'
// TODO: Add real tests!
const G = new Graph<string, string>()
const a = G.createVertex('A')
const b = G.createVertex('B')
const c = G.createVertex('C')
G.createEdge(a, b, 'a-b')
G.createEdge(b, c, 'b-c')
G.createEdge(c, a, 'c-a')
// console.log(G)
console.log(JSON.stringify(G))
console.log(Graph.fromJSON(
JSON.parse(JSON.stringify(G, null, 4))
))