-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsolver.js
More file actions
22 lines (17 loc) · 701 Bytes
/
solver.js
File metadata and controls
22 lines (17 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var sys = require('sys');
var edge = require('./lib/edge');
var graph = require('./lib/graph');
var vertex = require('./lib/vertex');
var Graph = new graph.Graph();
var VertexOne = new vertex.Vertex('nameOne', {});
var VertexTwo = new vertex.Vertex('nameTwo', {});
var VertexThree = new vertex.Vertex('nameThree', {});
Graph.addVertex(VertexOne);
Graph.addVertex(VertexTwo);
Graph.addVertex(VertexThree);
Graph.addEdge(new edge.Edge('nameOne', 'nameTwo', {}));
Graph.addEdge(new edge.Edge('nameOne', 'nameThree', {}));
var neighbours = VertexThree.getNeighbours();
//sys.puts(sys.inspect(Graph.edges()));
//sys.puts(sys.inspect(neighbours));
//sys.puts(sys.inspect(Graph));