2022-05-07 16:55:12 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
2022-05-16 16:47:27 +02:00
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2022-05-17 15:18:56 +02:00
|
|
|
<link
|
|
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor"
|
|
|
|
crossorigin="anonymous"
|
|
|
|
/>
|
2022-05-07 16:55:12 +02:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2022-05-17 15:18:56 +02:00
|
|
|
<nav class="navbar navbar-expand-lg bg-light">
|
|
|
|
<div class="container-fluid">
|
2022-05-17 15:20:40 +02:00
|
|
|
<a class="navbar-brand" href="./">WAVL Tree Visualization</a>
|
2022-05-17 15:18:56 +02:00
|
|
|
<button
|
|
|
|
class="navbar-toggler"
|
|
|
|
type="button"
|
|
|
|
data-bs-toggle="collapse"
|
|
|
|
data-bs-target="#navbarNav"
|
|
|
|
aria-controls="navbarNav"
|
|
|
|
aria-expanded="false"
|
|
|
|
aria-label="Toggle navigation"
|
|
|
|
>
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
|
|
<ul class="navbar-nav">
|
|
|
|
<li class="nav-item">
|
2022-05-17 15:20:40 +02:00
|
|
|
<a class="nav-link" href="./">Visualization</a>
|
2022-05-17 15:18:56 +02:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" aria-current="page" href="#"
|
|
|
|
>Comparator</a
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
2022-05-16 16:47:27 +02:00
|
|
|
<div class="container px-5 py-5">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-auto">
|
|
|
|
<form class="row" id="insertTree" onSubmit="return insertCallback()">
|
|
|
|
<div class="col-auto">
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
class="form-control"
|
|
|
|
id="insertInput"
|
|
|
|
type="text"
|
|
|
|
placeholder="Number to insert"
|
|
|
|
autofocus
|
|
|
|
/>
|
2022-05-16 16:47:27 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-auto">
|
|
|
|
<button class="btn btn-primary" type="submit">Insert</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-auto">
|
|
|
|
<form class="row" id="deleteTree" onSubmit="return deleteCallback()">
|
|
|
|
<div class="col-auto">
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
class="form-control"
|
|
|
|
id="deleteInput"
|
|
|
|
type="text"
|
|
|
|
placeholder="Number to delete"
|
|
|
|
/>
|
2022-05-16 16:47:27 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-auto">
|
|
|
|
<input class="btn btn-primary" type="submit" value="Delete" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-05-17 16:40:26 +02:00
|
|
|
<div class="row py-3">
|
|
|
|
<h4 class="col-auto">Prepared scenarios</h4>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="col-auto btn-group"
|
|
|
|
role="group"
|
|
|
|
aria-label="Prepared scenarios"
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-primary"
|
|
|
|
onclick="prepareDifferentRanks()"
|
|
|
|
data-bs-toggle="tooltip"
|
|
|
|
data-bs-placement="auto"
|
|
|
|
title="This scenario shows differences in ranks between AVL and WAVL after a deletion of key 1 from the prepared trees."
|
|
|
|
>
|
|
|
|
Different ranks
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-primary"
|
|
|
|
onclick="prepareDifferentTrees()"
|
|
|
|
data-bs-toggle="tooltip"
|
|
|
|
data-bs-placement="auto"
|
|
|
|
title="This scenario shows differences in ranks between AVL and WAVL after a deletion of key -31 from the prepared trees."
|
|
|
|
>
|
|
|
|
Different trees after delete
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-05-16 16:47:27 +02:00
|
|
|
<div class="row py-3">
|
|
|
|
<div class="col">
|
|
|
|
<div class="row">
|
|
|
|
<h4 class="col-auto">Choose left tree:</h4>
|
|
|
|
<div class="btn-group col-auto" role="group">
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="leftTreeSelection"
|
|
|
|
id="lWavlTreeBtn"
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(WAVLTree, 'left')"
|
|
|
|
/>
|
|
|
|
<label class="btn btn-outline-primary" for="lWavlTreeBtn"
|
|
|
|
>WAVL</label
|
|
|
|
>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="leftTreeSelection"
|
|
|
|
id="lAvlTreeBtn"
|
|
|
|
checked
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(AVLTree, 'left')"
|
|
|
|
/>
|
2022-05-16 16:47:27 +02:00
|
|
|
<label class="btn btn-outline-primary" for="lAvlTreeBtn">AVL</label>
|
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="leftTreeSelection"
|
|
|
|
id="lRavlTreeBtn"
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(RAVLTree, 'left')"
|
|
|
|
/>
|
|
|
|
<label class="btn btn-outline-primary" for="lRavlTreeBtn"
|
|
|
|
>rAVL</label
|
|
|
|
>
|
2022-05-16 16:47:27 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
<div class="row">
|
|
|
|
<h4 class="col-auto">Choose right tree:</h4>
|
|
|
|
<div class="btn-group col-auto" role="group">
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="rightTreeSelection"
|
|
|
|
id="rWavlTreeBtn"
|
|
|
|
checked
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(WAVLTree, 'right')"
|
|
|
|
/>
|
|
|
|
<label class="btn btn-outline-primary" for="rWavlTreeBtn"
|
|
|
|
>WAVL</label
|
|
|
|
>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="rightTreeSelection"
|
|
|
|
id="rAvlTreeBtn"
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(AVLTree, 'right')"
|
|
|
|
/>
|
2022-05-16 16:47:27 +02:00
|
|
|
<label class="btn btn-outline-primary" for="rAvlTreeBtn">AVL</label>
|
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="btn-check"
|
|
|
|
name="rightTreeSelection"
|
|
|
|
id="rRavlTreeBtn"
|
|
|
|
autocomplete="off"
|
|
|
|
onclick="switchTree(RAVLTree, 'right')"
|
|
|
|
/>
|
|
|
|
<label class="btn btn-outline-primary" for="rRavlTreeBtn"
|
|
|
|
>rAVL</label
|
|
|
|
>
|
2022-05-16 16:47:27 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row py-3">
|
2022-05-17 15:18:56 +02:00
|
|
|
<div class="col px-3" style="text-align: center" id="left"></div>
|
|
|
|
<div class="col px-3" style="text-align: center" id="right"></div>
|
2022-05-16 16:47:27 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-17 15:18:56 +02:00
|
|
|
</div>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<script src="https://d3js.org/d3.v5.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<script src="utils.js"></script>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<script src="node.js"></script>
|
|
|
|
<script src="ranked_tree.js"></script>
|
|
|
|
<script src="avl.js"></script>
|
|
|
|
<script src="wavl.js"></script>
|
|
|
|
<script src="ravl.js"></script>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<script src="recorder.js"></script>
|
2022-05-16 16:47:27 +02:00
|
|
|
|
2022-05-17 15:18:56 +02:00
|
|
|
<script
|
|
|
|
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"
|
2022-05-17 14:39:33 +02:00
|
|
|
integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"
|
|
|
|
crossorigin="anonymous"
|
2022-05-17 15:18:56 +02:00
|
|
|
></script>
|
|
|
|
<script src="comparator_visualization.js"></script>
|
2022-05-07 16:55:12 +02:00
|
|
|
</body>
|