-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (83 loc) · 3.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE>
<html>
<head>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.list-group {
/*width: 25%;*/
}
#di-input {
/*width: 10%;*/
}
#graph-canvas {
border: 2px solid black;
margin-right:5px;
margin-bottom: 5px;
}
</style>
<script type="text/javascript" src="paper-full.min.js"></script>
<script type="text/paperscript" src="GraphVisualizer.js" canvas="graph-canvas"></script>
</head>
<body>
<div class="container-fluid">
<h1>Graph and Traversal Tests</h1>
<p class="lead">Draw a graph with the visualizer, then click the algorithm you'd like to perform on it.</p>
<p> For more options, you can also define your graph in test.js</p>
<div>
<canvas id="graph-canvas" height="400" width="800"></canvas>
<!--<button class="btn btn-default" id="init-graph">Initialize Graph</button>-->
<p>Hold shift then mouse over two vertices to connect them with a randomly weighted, undirected edge.</p>
<p>Note: for the time being, the visualizer only builds undirected graphs with random weights</p>
</div>
<!--<div class="row">-->
<!-- <button class="btn btn-default col-md-6" id="topsort-go">topsort</button>-->
<!-- <ul class="list-group col-md-6" id="topsort-results">-->
<!-- </ul>-->
<!--</div>-->
<!--<div class="row">-->
<!-- <button class="btn btn-default col-md-6" id="g-bfs-go">graph BFS</button>-->
<!-- <ul class="list-group col-md-6" id="g-bfs-results">-->
<!-- </ul>-->
<!--</div>-->
<!--<div class="row">-->
<!-- <button class="btn btn-default col-md-6" id="g-dfs-go">graph recursive DFS</button>-->
<!-- <ul class="list-group col-md-6" id="g-dfs-results">-->
<!-- </ul>-->
<!--</div>-->
<div class="row">
<div class="input-group col-md-6">
<div class="input-group-btn">
<button class="btn btn-default" id="dijkstra-go">dijkstra</button>
</div>
<span>Start:</span>
<input type="text" id="di-input" class="form-control" value="vert0">
<div>End:</div>
<input type="text" id="di-end-input" class="form-control" value="vert1">
</div>
<ul class="list-group col-md-6" id="dijkstra-results">
</ul>
</div>
<!--<div class="row">-->
<!-- <button class="btn btn-default col-md-6" id="bell-ford-go">Bellman-Ford</button>-->
<!-- <ul class="list-group col-md-6" id="bell-ford-results">-->
<!-- </ul>-->
<!--</div>-->
<div class="row">
<button class="btn btn-default col-md-6" id="prims-go">Prim-Jarnik's MST Finder</button>
<ul class="list-group col-md-6" id="prims-results">
</ul>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script>
<script type="text/javascript" src="Heap.js"></script>
<script type="text/javascript" src="jsGraph.js"></script>
<script type="text/javascript" src="Traversals.js"></script>
<script type="text/javascript" src="tests.js"></script>
</div>
<div class="container">
<div class="footer" style="margin: 0 auto; padding-top: 10%; text-align: center;">
<p class="text-muted">Johnny Snelgrove 2013</p>
</div>
</div>
</body>
</html>