More graphs and primes!
This commit is contained in:
6 files changed
+301
-157
No files matched your search
+1
-17
@@ -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))
|
||||
))
|
||||
Reference in new issue
Block a user