pull/1/head
Oliver Kennedy 2018-08-31 00:17:41 -04:00
parent c1830fa0d3
commit 12cb3911cb
5 changed files with 3001 additions and 0 deletions

View File

@ -0,0 +1,432 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSE 662 - Languages and Runtimes for Big Data</title>
<meta name="description" content="Material for the University at Buffalo's CSE-662 'Languages and Runtimes for Big Data'">
<meta name="author" content="Oliver Kennedy">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../reveal.js-3.7.0/css/reveal.css">
<link rel="stylesheet" href="../reveal.js-3.7.0/css/theme/moon.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="../reveal.js-3.7.0/lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '../reveal.js-3.7.0/css/print/pdf.css' : '../reveal.js-3.7.0/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<section>
<h2>Functional Data Structures</h2>
</section>
<section>
<h3>Reminder</h3>
<p>Learned Index Structures due Weds (in class)</p>
<p>One person from each group should email me...<ul>
<li>[CSE-662] in the subject line</li>
<li>A list of group members (Names + UBITs)</li>
<li>The project seed that your group would like to work on</li>
</ul></p>
</section>
</section>
<section>
<section>
<p><span class="fragment highlight-red">Mutable</span> vs Immutable Data</p>
</section>
<section>
<pre><code>
X = [ "Alice", "Bob", "Carol", "Dave" ]
</code></pre>
<table class="fragment">
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X : </td>
<td style="border-style: solid; border-width: 5px;">Alice</td>
<td style="border-style: solid; border-width: 5px;">Bob</td>
<td style="border-style: solid; border-width: 5px;">Carol</td>
<td style="border-style: solid; border-width: 5px;">Dave</td>
</tr>
</table>
<pre><code class="fragment">
print(X[2]) // -> "Carol"
</code></pre>
<pre><code class="fragment">
X[2] = "Eve"
</code></pre>
<table class="fragment">
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X : </td>
<td style="border-style: solid; border-width: 5px;">Alice</td>
<td style="border-style: solid; border-width: 5px;">Bob</td>
<td style="border-style: solid; border-width: 5px; color: white; border-color: white">Eve</td>
<td style="border-style: solid; border-width: 5px;">Dave</td>
</tr>
</table>
<pre><code class="fragment">
print(X[2]) // -> "Eve"
</code></pre>
</section>
<section>
<pre><code>
X = [ Alice, Bob, Carol, Dave ]
</code></pre>
<table>
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X : </td>
<td style="border-style: solid; border-width: 5px;">Alice</td>
<td style="border-style: solid; border-width: 5px;">Bob</td>
<td style="border-style: solid; border-width: 5px;">Carol</td>
<td style="border-style: solid; border-width: 5px;">Dave</td>
</tr>
</table>
<table style="margin-top: 80px">
<thead class="fragment">
<th style="width: 300px; text-align: center;">Thread 1</th>
<th style="width: 300px; text-align: center;">Thread 2</th>
</thead>
<tr>
<td><pre><code>
X[2] = "Eve"
</code></pre></td>
<td><pre><code>
print(X[2])
</code></pre></td>
</tr>
<tr class="fragment"><td></td><td style="font-size: 300%;text-align: center">🤔</td></tr>
</table>
</section>
<section>
<h3>Mutable Data Structures</h3>
<ul>
<li class="fragment">The programmer's intended ordering is unclear.</li>
<li class="fragment">Atomicity/Correctness requires locking.</li>
<li class="fragment">Versioning requires copying the data structure.</li>
<li class="fragment">Cache coherency is expensive.</li>
</ul>
<p style="font-weight: bold; margin-top: 50px;" class="fragment">Can these problems be avoided?</p>
</section>
</section>
<section>
<section>
<p>Mutable vs <span class="fragment highlight-red">Immutable Data</span></p>
</section>
<section>
<pre><code>
X = [ "Alice", "Bob", "Carol", "Dave" ]
</code></pre>
<table>
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X : </td>
<td style="border-style: solid; border-width: 5px;">Alice</td>
<td style="border-style: solid; border-width: 5px;">Bob</td>
<td style="border-style: solid; border-width: 5px;">Carol</td>
<td style="border-style: solid; border-width: 5px;">Dave</td>
</tr>
</table>
<pre><code class="fragment" data-fragment-index="1">
print(X[2]) // -> "Carol"
</code></pre>
<pre><code class="fragment fade-in-then-semi-out" data-fragment-index="1">
X[2] = "Eve"
</code></pre>
<p style="font-weight: bold; margin-top: 50px;" class="fragment">Don't allow writes!</p>
<p style="font-weight: bold; margin-top: 50px;" class="fragment">But what if we need to update the structure?</p>
</section>
<section>
<h3>Idea 1: Copy</h3>
<table>
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X : </td>
<td>Alice</td>
<td>Bob</td>
<td>Carol</td>
<td>Dave</td>
</tr>
</table>
<table>
<tr>
<td style="font-size: 120%; font-weight: bold; font-family: fixed">X' : </td>
<td class="fragment">Alice</td>
<td class="fragment">Bob</td>
<td class="fragment">Eve</td>
<td class="fragment">Dave</td>
</tr>
</table>
<p style="font-weight: bold; margin-top: 50px;" class="fragment">Slooooooooooooooooooooooow!</p>
</section>
<section>
<h3>Idea 2: Break it Down</h3>
<svg data-src="graphics/2018-08-31-FunctionalTreeInsertion.svg" height="500px" style="background-color: lightgrey;" />
<p class="fragment">Data is always added, not replaced!</p>
</section>
<section>
<h4>Immutable Data Structures
<div style="font-size: 50%">(aka 'Functional' or 'Persistent' Data Structures)</div></h4>
<ul>
<li class="fragment">Once an object is created it never changes.</li>
<li class="fragment">The object persists until all pointers to it go away, at which point it is garbage collected.</li>
<li class="fragment">Only the "root" pointer is ever allowed to change, to point to a new version.</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Linked List Stacks</h2>
</section>
<section>
<svg data-src="graphics/2018-08-31-FunctionalStack.svg" width="796px" height="493px" style="background-color: lightgrey;" stretch/>
</section>
</section>
<section>
<section>
<h2>Class Exercise 1</h2>
<p>How would you implement:</p>
<pre><code>
list update(list, index, new_value)
</code></pre>
</section>
<section>
<h2>Class Exercise 2</h2>
<p>Implement a set with:</p>
<pre><code>
set init()
boolean is_member(set, elem)
set insert(set, elem)
</code></pre>
</section>
</section>
<section>
<section>
<h3 class="fragment" data-fragment-index="2">Lazy Evaluation</h3>
<img src="graphics/2018-08-31-FunctionalStackMerge.svg" style="background-color: lightgrey" />
<p class="fragment" data-fragment-index="1">Can we do better?</p>
</section>
<section>
<h3>Putting off Work</h3>
<table>
<tr>
<td style="vertical-align: middle; font-size: 150%;"><pre>x = "expensive()"</pre></td>
<td class="fragment" style="text-align: center;">Fast<br/>(Just saving a 'todo')</td>
</tr>
<tr>
<td style="vertical-align: middle; font-size: 150%;"><pre>print(x)</pre></td>
<td class="fragment" style="text-align: center;">Slow<br/>(Performing the 'todo')</td>
</tr>
<tr>
<td style="vertical-align: middle; font-size: 150%;"><pre>print(x)</pre></td>
<td class="fragment" style="text-align: center;">Fast<br/>('todo' already done)</td>
</tr>
</table>
</section>
<section>
<h2>Class Exercise 3</h2>
<img src="graphics/2018-08-31-FunctionalStackMerge.svg" style="background-color: lightgrey" />
<p>Make it better!</p>
</section>
<section>
<h3>Putting off Work</h3>
<pre><code>
concatenate(a, b) {
a', front = pop(a)
if a' is empty {
return (front, b)
} else {
return (front, "concatenate(a', b)")
}
}
</code></pre>
<p class="fragment">What is the time complexity of this concatenate?</p>
<p class="fragment">What happens to reads?</p>
</section>
<section>
<h3>Lazy Evaluation</h3>
<p>Save work for later...
<ul>
<li>... and avoid work that is never requred.</li>
<li>... to spread out work over multiple calls.</li>
<li>... for better "amortized" costs.</li>
</ul>
</p>
</section>
</section>
<section>
<section>
<h3>Amortized Analysis</h3>
<p>Allow operation A to 'pay it forward' for another operation B that hasn't happened yet.</p>
<p class="fragment">... or allow an operation B to 'borrow' from another operation A that hasn't happened yet.</p>
<ul class="fragment">
<li>A's time complexity goes up by X.</li>
<li>B's time complexity goes down by X.</li>
</ul>
</section>
<section>
<h4>Example: Amortized Queues</h4>
<img src="graphics/2018-08-31-AmortizedQueue.svg" style="background-color: lightgrey" height="600px" />
</section>
<section>
<h4>Example: Amortized Queues</h4>
<pre><code>
queue enqueue(queue, item) {
return {
current : queue.current,
todo : push(queue.todo, item)
)
}
</code></pre>
<p class="fragment">What is the cost?</p>
</section>
<section>
<h4>Example: Amortized Queues</h4>
<pre><code>
queue dequeue(queue) {
if(queue.current != NULL){
return { current: pop(queue.current), todo: queue.todo }
} else if(queue.todo != NULL) {
return { current: reverse(queue.todo), todo: NULL }
} else {
return { current: NULL, todo: NULL }
}
}
</code></pre>
<p class="fragment">What is the cost?</p>
</section>
<section>
<h4>Example: Amortized Analysis</h4>
<dl>
<dt class="fragment">enqueue(): Push onto todo stack</dt>
<dd class="fragment">$O(1) + \text{create } 1 \text{ credit}$</dd>
<dt class="fragment">dequeue(): Pop current OR Reverse todo </dt>
<dd class="fragment">Either:<ul>
<li>Pop current queue: <span class="fragment">$O(1)$</span></li>
<li>Reverse stack: <span class="fragment">$O(1) + \text{consume } N \text{ credits}$</span></li>
</ul>
</dl>
<p class="fragment">Critical requirement of amortized analysis: Must ensure that every credit consumed is created.</p>
</section>
</section>
</div>
</div>
<script src="../reveal.js-3.7.0/lib/js/head.min.js"></script>
<script src="../reveal.js-3.7.0/js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: '../reveal.js-3.7.0/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '../reveal.js-3.7.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '../reveal.js-3.7.0/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '../reveal.js-3.7.0/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '../reveal.js-3.7.0/plugin/search/search.js', async: true },
{ src: '../reveal.js-3.7.0/plugin/zoom-js/zoom.js', async: true },
{ src: '../reveal.js-3.7.0/plugin/notes/notes.js', async: true },
{ src: '../reveal.js-3.7.0/plugin/math/math.js',
condition: function() { return true; },
mathjax: '../reveal.js-3.7.0/js/MathJax.js'
},
{ src: '../reveal.js-3.7.0/plugin/svginline/es6-promise.auto.js', async: false },
{ src: '../reveal.js-3.7.0/plugin/svginline/data-src-svg.js', async: false }
]
});
</script>
</body>
</html>

View File

@ -0,0 +1,529 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="225.98737mm"
height="150.17308mm"
viewBox="0 0 225.98736 150.17308"
version="1.1"
id="svg2230"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="2018-08-31-AmortizedQueue.svg">
<defs
id="defs2224">
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5234"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5232"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5170"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5168"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker5064"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path5062"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker4768"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4766"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker4366"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path4364"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker3642"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend"
inkscape:collect="always">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path3640"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker2868"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path2866"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker5064-3"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path5062-6"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker2868-7"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path2866-5"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1554"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1552"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1562"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1560"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1566"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1564"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1578"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1576"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.74297138"
inkscape:cx="-46.101508"
inkscape:cy="113.37898"
inkscape:document-units="mm"
inkscape:current-layer="g4238"
showgrid="false"
fit-margin-top="10"
fit-margin-left="20"
fit-margin-right="20"
fit-margin-bottom="10"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2227">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(61.528392,-22.775594)">
<g
id="g4238"
transform="translate(-53.266444,-98.50161)">
<g
transform="translate(-56.39387,8.0139272)"
id="g2261">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect38"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect2257"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g2267"
transform="translate(-37.39683,37.002266)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect2263"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2265"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<g
transform="translate(-18.39979,65.634492)"
id="g2273">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2269"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect2271"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<path
inkscape:connector-curvature="0"
id="path2275"
d="m 74.26399,175.43055 v 19.51068"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3642)"
d="M 24.460535,140.91459 H 43.971208"
id="path3638"
inkscape:connector-curvature="0" />
<text
id="text4192"
y="179.59859"
x="51.449387"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="179.59859"
x="51.449387"
id="tspan4190"
sodipodi:role="line">0</tspan></text>
<text
id="text4196"
y="208.59206"
x="70.713318"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="208.59206"
x="70.713318"
id="tspan4194"
sodipodi:role="line">1</tspan></text>
<text
id="text4200"
y="237.34412"
x="90.555824"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="237.34412"
x="90.555824"
id="tspan4198"
sodipodi:role="line">2</tspan></text>
<text
id="text4216"
y="143.45364"
x="11.102432"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="143.45364"
x="11.102432"
id="tspan4214"
sodipodi:role="line">aq</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)"
d="m 93.138091,204.27587 v 19.51068"
id="path2498"
inkscape:connector-curvature="0" />
<g
id="g2504"
transform="translate(-56.39387,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect2500"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2502"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)"
d="m 54.677659,140.51126 v 24.85241"
id="path2506"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<g
id="g2512"
transform="translate(4.5018135,8.0139272)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect2508"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2510"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<g
transform="translate(23.498853,37.002266)"
id="g2518">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2514"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect2516"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g2524"
transform="translate(42.495893,65.634492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect2520"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2522"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)"
d="m 135.15967,175.43055 v 19.51068"
id="path2526"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="112.34507"
y="179.59859"
id="text2530"><tspan
sodipodi:role="line"
id="tspan2528"
x="112.34507"
y="179.59859"
style="stroke-width:0.26458332">5</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="131.60901"
y="208.59206"
id="text2534"><tspan
sodipodi:role="line"
id="tspan2532"
x="131.60901"
y="208.59206"
style="stroke-width:0.26458332">4</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="151.45151"
y="237.34412"
id="text2538"><tspan
sodipodi:role="line"
id="tspan2536"
x="151.45151"
y="237.34412"
style="stroke-width:0.26458332">3</tspan></text>
<path
inkscape:connector-curvature="0"
id="path2540"
d="m 154.03377,204.27587 v 19.51068"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path2542"
d="m 73.727662,140.51126 v 14.98804 h 41.812558 v 10.48758"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="55.751167"
y="258.22525"
id="text2546"><tspan
sodipodi:role="line"
id="tspan2544"
x="55.751167"
y="258.22525"
style="stroke-width:0.26458332">Active Queue</tspan></text>
<text
id="text2550"
y="257.86914"
x="135.47083"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="257.86914"
x="135.47083"
id="tspan2548"
sodipodi:role="line">Todo Stack</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.26499999, 0.26499999;stroke-dashoffset:0;stroke-opacity:1"
d="m 95.026805,161.02582 v 29.55755 h 17.093525 v 27.77698 h 18.8741 v 43.08993"
id="path2554"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1,650 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="397.51547mm"
height="74.291786mm"
viewBox="0 0 397.51547 74.291784"
version="1.1"
id="svg2230"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="2018-08-31-FunctionalStackMerge.svg">
<defs
id="defs2224">
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5234"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5232"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5170"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5168"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker5064"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path5062"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker4768"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4766"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker4366"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path4364"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker3642"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend"
inkscape:collect="always">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path3640"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker2868"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path2866"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path1465"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker5064-3"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path5062-6"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker2868-7"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path2866-5"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker3642-3"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend"
inkscape:collect="always">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path3640-5"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1554"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1552"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1562"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1560"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1566"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1564"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1578"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1576"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.74297138"
inkscape:cx="575.33947"
inkscape:cy="-71.080879"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="10"
fit-margin-left="20"
fit-margin-right="20"
fit-margin-bottom="10"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2227">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(66.498631,-6.7504143)">
<g
id="g5031">
<g
transform="translate(-58.964286,-114.52679)"
id="g4238">
<g
id="g2261"
transform="translate(-56.39387,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect38"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2257"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<g
transform="translate(-7.5962757,-27.261492)"
id="g2267">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2263"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect2265"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g2273"
transform="translate(41.201327,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect2269"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2271"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064)"
d="M 73.504493,140.91459 H 93.015166"
id="path2275"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path2864"
d="m 121.87491,140.91459 h 19.51067"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2868)" />
<path
inkscape:connector-curvature="0"
id="path3638"
d="M 24.460535,140.91459 H 43.971208"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3642)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="51.449387"
y="144.32314"
id="text4192"><tspan
sodipodi:role="line"
id="tspan4190"
x="51.449387"
y="144.32314"
style="stroke-width:0.26458332">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="100.62698"
y="144.32831"
id="text4196"><tspan
sodipodi:role="line"
id="tspan4194"
x="100.62698"
y="144.32831"
style="stroke-width:0.26458332">1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="149.67093"
y="144.39807"
id="text4200"><tspan
sodipodi:role="line"
id="tspan4198"
x="149.67093"
y="144.39807"
style="stroke-width:0.26458332">2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="12.160764"
y="143.45364"
id="text4216"><tspan
sodipodi:role="line"
id="tspan4214"
x="12.160764"
y="143.45364"
style="stroke-width:0.26458332">xs</tspan></text>
</g>
<g
id="g4280"
transform="translate(129.26786,-114.52679)">
<g
transform="translate(-56.39387,-27.261492)"
id="g4244">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4240"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect4242"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g4250"
transform="translate(-7.5962757,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect4246"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4248"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<g
transform="translate(41.201327,-27.261492)"
id="g4256">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4252"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect4254"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<path
inkscape:connector-curvature="0"
id="path4258"
d="M 73.504493,140.91459 H 93.015166"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2868)"
d="m 121.87491,140.91459 h 19.51067"
id="path4260"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3642)"
d="M 24.460535,140.91459 H 43.971208"
id="path4262"
inkscape:connector-curvature="0" />
<text
id="text4266"
y="144.32314"
x="51.449387"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="144.32314"
x="51.449387"
id="tspan4264"
sodipodi:role="line">3</tspan></text>
<text
id="text4270"
y="144.32831"
x="100.62698"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="144.32831"
x="100.62698"
id="tspan4268"
sodipodi:role="line">4</tspan></text>
<text
id="text4274"
y="144.39807"
x="149.67093"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="144.39807"
x="149.67093"
id="tspan4272"
sodipodi:role="line">5</tspan></text>
<text
id="text4278"
y="143.45364"
x="12.160764"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="143.45364"
x="12.160764"
id="tspan4276"
sodipodi:role="line">ys</tspan></text>
</g>
</g>
<g
transform="translate(-58.964286,-78.621902)"
id="g562">
<g
id="g526"
transform="translate(-56.39387,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect522"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect524"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<g
transform="translate(-7.5962757,-27.261492)"
id="g532">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect528"
width="18.99704"
height="17.386902"
x="102.05357"
y="159.0387" />
<rect
y="159.0387"
x="121.05061"
height="17.386902"
width="18.99704"
id="rect530"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g538"
transform="translate(41.201327,-27.261492)">
<rect
y="159.0387"
x="102.05357"
height="17.386902"
width="18.99704"
id="rect534"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect536"
width="18.99704"
height="17.386902"
x="121.05061"
y="159.0387" />
</g>
<path
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5064-3)"
d="M 73.504493,140.91459 H 93.015166"
id="path540"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path542"
d="m 121.87491,140.91459 h 19.51067"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker2868-7)" />
<path
inkscape:connector-curvature="0"
id="path544"
d="M 24.460535,140.91459 H 43.971208"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3642-3)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="51.449387"
y="144.32314"
id="text548"><tspan
sodipodi:role="line"
id="tspan546"
x="51.449387"
y="144.32314"
style="stroke-width:0.26458332">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="100.62698"
y="144.32831"
id="text552"><tspan
sodipodi:role="line"
id="tspan550"
x="100.62698"
y="144.32831"
style="stroke-width:0.26458332">1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="149.67093"
y="144.39807"
id="text556"><tspan
sodipodi:role="line"
id="tspan554"
x="149.67093"
y="144.39807"
style="stroke-width:0.26458332">2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="12.160764"
y="143.45364"
id="text560"><tspan
sodipodi:role="line"
id="tspan558"
x="12.160764"
y="143.45364"
style="stroke-width:0.26458332">zs</tspan></text>
</g>
<path
inkscape:connector-curvature="0"
id="path586"
d="m 112.03897,63.030881 c 60.1667,0.336436 50.51785,-9.658712 62.88859,-28.393565"
style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker3642-3)"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,362 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="234.40376mm"
height="159.07254mm"
viewBox="0 0 234.40376 159.07254"
version="1.1"
id="svg8"
sodipodi:docname="2018-08-31-FunctionalTreeInsertion.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<defs
id="defs2">
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker1760"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path1758"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path1465"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="204.61129"
inkscape:cy="334.44177"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(28.333702,-24.10119)">
<g
id="g1077"
class="fragment"
data-fragment-index="2">
<g
id="g1013"
transform="translate(92.402607)">
<g
transform="matrix(-1,0,0,1,74.083336,-52.218583)"
id="g1005">
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 14.363095,112.92559 -45.030931,52.21858"
id="path1003"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<g
id="g1009"
transform="translate(45.357146,-52.218583)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1007"
d="M 14.363095,112.92559 C -9.3107212,143.62953 -87.893361,140.87448 -122.36487,165.14417"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<circle
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="circle1011"
cx="59.720238"
cy="60.329048"
r="9.4494047" />
</g>
<g
id="g906-3"
transform="translate(181.75755)">
<path
sodipodi:nodetypes="cc"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 14.363095,112.92559 c 14.017078,36.02517 6.541308,109.17087 -58.208334,43.08929"
id="path902-5"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path904-6"
d="M 14.363095,112.92559 -8.315476,154.88095"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<circle
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="circle67-2"
cx="196.12065"
cy="112.54763"
r="9.4494047" />
</g>
<g
id="g63"
transform="translate(1.0935465e-5)"
class="fragment"
data-fragment-index="1">
<rect
y="146.1875"
x="155.11229"
height="17.386906"
width="39.309525"
id="rect34"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text28"
y="158.66367"
x="164.7935"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="158.66367"
x="164.7935"
id="tspan26"
sodipodi:role="line">Eve</tspan></text>
</g>
<g
id="g1114">
<g
transform="translate(0.70556994)"
id="g1001">
<g
id="g994"
transform="matrix(-1,0,0,1,74.083336,-52.218583)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path992"
d="m 14.363095,112.92559 -45.030931,52.21858"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="translate(45.357146,-52.218583)"
id="g900-3">
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 14.363095,112.92559 -45.030931,52.21858"
id="path89-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<circle
r="9.4494047"
cy="60.329048"
cx="59.720238"
id="path65-5"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g990">
<g
id="g921">
<g
transform="translate(0.32621501)"
id="g900">
<path
inkscape:connector-curvature="0"
id="path896"
d="m 14.363095,112.92559 22.678571,41.95536"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 14.363095,112.92559 -8.315476,154.88095"
id="path89"
inkscape:connector-curvature="0" />
</g>
<g
id="g77">
<g
id="g43">
<rect
y="146.1875"
x="-27.833702"
height="17.386906"
width="39.309525"
id="rect38"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text12"
y="158.82645"
x="-20.661381"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="158.82645"
x="-20.661381"
id="tspan10"
sodipodi:role="line">Alice</tspan></text>
</g>
<g
id="g48"
transform="translate(0.8352183)">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect36"
width="39.309525"
height="17.386906"
x="17.067579"
y="146.1875" />
<text
id="text16"
y="158.82645"
x="26.270784"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="158.82645"
x="26.270784"
id="tspan14"
sodipodi:role="line">Bob</tspan></text>
</g>
</g>
<circle
r="9.4494047"
cy="112.54762"
cx="14.68931"
id="path65"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
id="g936">
<g
id="g906"
transform="translate(91.799214)">
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 14.363095,112.92559 22.678571,41.95536"
id="path902"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path904"
d="M 14.363095,112.92559 -8.315476,154.88095"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g87">
<g
id="g53"
transform="translate(-0.238681)">
<rect
y="146.1875"
x="63.877975"
height="17.386906"
width="39.309525"
id="rect30"
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none" />
<text
id="text20"
y="158.82645"
x="70.014183"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="158.82645"
x="70.014183"
id="tspan18"
sodipodi:role="line">Carol</tspan></text>
</g>
<g
id="g58"
transform="translate(0.36749865)">
<rect
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="rect32"
width="39.309525"
height="17.386906"
x="109.0083"
y="146.1875" />
<text
id="text24"
y="158.66367"
x="114.72076"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="stroke-width:0.26458332"
y="158.66367"
x="114.72076"
id="tspan22"
sodipodi:role="line">Dave</tspan></text>
</g>
</g>
<circle
style="fill:#b3b3b3;stroke:#4d4d4d;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
id="circle67"
cx="106.16231"
cy="112.54762"
r="9.4494047" />
</g>
</g>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 60.425811,24.10119 V 48.291665"
id="path1460"
inkscape:connector-curvature="0"
data-fragment-index="3"
class="fragment fade-in-then-semi-out" />
<path
inkscape:connector-curvature="0"
id="path1756"
d="M 152.27403,24.10119 V 48.291665"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1760)"
data-fragment-index="4"
class="fragment" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB