forked from Minibrams/visualized-search-comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
57 lines (52 loc) · 2.65 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>Sorting algorithms visualized</title>
</head>
<body>
<section class="container-fluid pt-4">
<h1>Search Visualizer!</h1>
<h6>Enter your own data or generate some random data with the buttons below.</h6>
<p>When entering data, separate values by a comma.</p>
<p style="font-style: italic">For visual reasons, choose integers between 0 and 100 so they fit inside the bubbles</p>
<input class="form-control" type="text" id="userInput" />
<p visibility="hidden" id="inputErrorMessageField"></p>
<button class="btn btn-info" style="margin-bottom: 20px;" id="resetWithInput">Reset with my data</button>
<p>Enter the number of random numbers to be generated.</p>
<input class="form-control col-4" type="number" id="numRandomNumbersField" value="30" />
<button class="btn btn-info" style="margin-bottom: 20px;" id="reset">Reset with random numbers</button>
</section>
<section class="container-fluid">
<div class="row">
<div class="col-lg-6 col-sm-12 left" id="linearCanvas">
<h1>Linear Search</h1>
<button class="btn btn-info" id="stepLinear">Step</button>
<div class="infoField">
<h6 id="stepCountLinear">Number of steps: 0</h6>
<h6 id="exclusionCounterLinear">Number of excluded nodes: 0</h6>
</div>
</div>
<div class="col-lg-6 col-sm-12 right" id="binaryCanvas">
<h1>Binary Search</h1>
<button class="btn btn-info" id="stepBinary">Step</button>
<div class="infoField">
<input type="range" min="0" max="100" value="50" class="slider" id="ySpacing"/>
<h6 id="stepCountBinary">Number of steps: 0</h6>
<h6 id="exclusionCounterBinary">Number of excluded nodes: 0</h6>
</div>
</div>
</div>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/addons/p5.dom.min.js"></script>
<script src="classes/visualShared.js"></script>
<script src="classes/visualBinary.js"></script>
<script src="classes/visualLinear.js"></script>
<script src="main.js"></script>
</body>
</html>