Switch to SVG instead of png

This commit is contained in:
Carol (Nichols || Goulding) 2016-09-06 18:16:57 -04:00
parent ed557992cb
commit 8029bdb072
9 changed files with 368 additions and 5 deletions

View File

@ -167,7 +167,7 @@ You might say “copy the `String`!” This is both correct and incorrect at the
same time. It does a _shallow_ copy of the `String`. Whats that mean? Well,
lets take a look at what `String` looks like under the covers:
<img alt="string" src="img/trpl04-01.png" class="center" style="width: 50%;" />
<img alt="String in memory" src="img/trpl04-01.svg" class="center" style="width: 50%;" />
A `String` is made up of three parts: a pointer to the memory that holds the
contents of the string, a length, and a capacity. The length is how much memory
@ -180,11 +180,11 @@ When we assign `s1` to `s2`, the `String` itself is copied, meaning we copy the
pointer, the length, and the capacity. We do not copy the data that the
`String`'s pointer refers to. In other words, it looks like this:
<img alt="s1 and s2" src="img/trpl04-02.png" class="center" style="width: 50%;" />
<img alt="s1 and s2 pointing to the same value" src="img/trpl04-02.svg" class="center" style="width: 50%;" />
_Not_ this:
<img alt="s1 and s2 to two places" src="img/trpl04-03.png" class="center" style="width: 50%;" />
<img alt="s1 and s2 to two places" src="img/trpl04-03.svg" class="center" style="width: 50%;" />
Theres a problem here. Both data pointers are pointing to the same place. Why
is this a problem? Well, when `s2` goes out of scope, it will free the memory
@ -240,7 +240,7 @@ also invalidates the first binding, instead of calling this a shallow copy,
it's called a _move_. Here we would read this by saying that `s1` was _moved_
into `s2`. So what actually happens looks like this:
<img alt="s1 and s2 to the same place" src="img/trpl-04-04.png" class="center" style="width: 50%;" />
<img alt="s1 moved to s2" src="img/trpl04-04.svg" class="center" style="width: 50%;" />
That solves our problem! With only `s2` valid, when it goes out of scope, it
alone will free the memory, and were done.
@ -279,7 +279,7 @@ println!("{}", s1);
This will work just fine. Remember our diagram from before? In this case,
it _is_ doing this:
<img alt="s1 and s2 to two places" src="img/trpl04-03.png" class="center" style="width: 50%;" />
<img alt="s1 and s2 to two places" src="img/trpl04-03.svg" class="center" style="width: 50%;" />
When you see a call to `clone()`, you know that some arbitrary code is being
executed, and that code may be expensive. Its a visual indicator that something

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

65
src/img/trpl04-01.svg Normal file
View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: %3 Pages: 1 -->
<svg
viewBox="0.00 0.00 1000.00 700.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(4.16667 4.16667) rotate(0) translate(4 152)">
<title>%3</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-152 233,-152 233,4 -4,4"/>
<!-- table0 -->
<g id="node1" class="node"><title>table0</title>
<polyline fill="none" stroke="black" points="8,-124 96,-124 "/>
<text text-anchor="start" x="45.7759" y="-129.8" font-family="Times,serif" font-size="14.00">s1</text>
<polygon fill="none" stroke="black" points="8,-104 8,-124 60,-124 60,-104 8,-104"/>
<text text-anchor="start" x="18.8413" y="-109.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-104 60,-124 96,-124 96,-104 60,-104"/>
<text text-anchor="start" x="62.8413" y="-109.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-84 8,-104 60,-104 60,-84 8,-84"/>
<text text-anchor="start" x="26.2241" y="-89.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-84 60,-104 96,-104 96,-84 60,-84"/>
<polygon fill="none" stroke="black" points="8,-64 8,-84 60,-84 60,-64 8,-64"/>
<text text-anchor="start" x="25.4482" y="-69.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-64 60,-84 96,-84 96,-64 60,-64"/>
<text text-anchor="start" x="74.5" y="-69.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-44 8,-64 60,-64 60,-44 8,-44"/>
<text text-anchor="start" x="10.6826" y="-49.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-44 60,-64 96,-64 96,-44 60,-44"/>
<text text-anchor="start" x="74.5" y="-49.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table1 -->
<g id="node2" class="node"><title>table1</title>
<polygon fill="none" stroke="black" points="148.5,-104 148.5,-124 185.5,-124 185.5,-104 148.5,-104"/>
<text text-anchor="start" x="151.448" y="-109.8" font-family="Times,serif" font-size="14.00">index</text>
<polygon fill="none" stroke="black" points="185.5,-104 185.5,-124 221.5,-124 221.5,-104 185.5,-104"/>
<text text-anchor="start" x="188.341" y="-109.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="148.5,-84 148.5,-104 185.5,-104 185.5,-84 148.5,-84"/>
<text text-anchor="start" x="163.5" y="-89.8" font-family="Times,serif" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="185.5,-84 185.5,-104 221.5,-104 221.5,-84 185.5,-84"/>
<text text-anchor="start" x="200" y="-89.8" font-family="Times,serif" font-size="14.00">h</text>
<polygon fill="none" stroke="black" points="148.5,-64 148.5,-84 185.5,-84 185.5,-64 148.5,-64"/>
<text text-anchor="start" x="163.5" y="-69.8" font-family="Times,serif" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="185.5,-64 185.5,-84 221.5,-84 221.5,-64 185.5,-64"/>
<text text-anchor="start" x="200.393" y="-69.8" font-family="Times,serif" font-size="14.00">e</text>
<polygon fill="none" stroke="black" points="148.5,-44 148.5,-64 185.5,-64 185.5,-44 148.5,-44"/>
<text text-anchor="start" x="163.5" y="-49.8" font-family="Times,serif" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="185.5,-44 185.5,-64 221.5,-64 221.5,-44 185.5,-44"/>
<text text-anchor="start" x="201.555" y="-49.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-24 148.5,-44 185.5,-44 185.5,-24 148.5,-24"/>
<text text-anchor="start" x="163.5" y="-29.8" font-family="Times,serif" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="185.5,-24 185.5,-44 221.5,-44 221.5,-24 185.5,-24"/>
<text text-anchor="start" x="201.555" y="-29.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-4 148.5,-24 185.5,-24 185.5,-4 148.5,-4"/>
<text text-anchor="start" x="163.5" y="-9.8" font-family="Times,serif" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="185.5,-4 185.5,-24 221.5,-24 221.5,-4 185.5,-4"/>
<text text-anchor="start" x="200" y="-9.8" font-family="Times,serif" font-size="14.00">o</text>
</g>
<!-- table0&#45;&gt;table1 -->
<g id="edge1" class="edge"><title>table0:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-94C79,-94 109.186,-94 137.297,-94"/>
<polygon fill="black" stroke="black" points="137.5,-97.5001 147.5,-94 137.5,-90.5001 137.5,-97.5001"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

90
src/img/trpl04-02.svg Normal file
View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: %3 Pages: 1 -->
<svg
viewBox="0.00 0.00 1000.00 1000.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(4.16667 4.16667) rotate(0) translate(4 238)">
<title>%3</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-238 233,-238 233,4 -4,4"/>
<!-- table0 -->
<g id="node1" class="node"><title>table0</title>
<polyline fill="none" stroke="black" points="8,-210 96,-210 "/>
<text text-anchor="start" x="45.7759" y="-215.8" font-family="Times,serif" font-size="14.00">s1</text>
<polygon fill="none" stroke="black" points="8,-190 8,-210 60,-210 60,-190 8,-190"/>
<text text-anchor="start" x="18.8413" y="-195.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-190 60,-210 96,-210 96,-190 60,-190"/>
<text text-anchor="start" x="62.8413" y="-195.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-170 8,-190 60,-190 60,-170 8,-170"/>
<text text-anchor="start" x="26.2241" y="-175.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-170 60,-190 96,-190 96,-170 60,-170"/>
<polygon fill="none" stroke="black" points="8,-150 8,-170 60,-170 60,-150 8,-150"/>
<text text-anchor="start" x="25.4482" y="-155.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-150 60,-170 96,-170 96,-150 60,-150"/>
<text text-anchor="start" x="74.5" y="-155.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-130 8,-150 60,-150 60,-130 8,-130"/>
<text text-anchor="start" x="10.6826" y="-135.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-130 60,-150 96,-150 96,-130 60,-130"/>
<text text-anchor="start" x="74.5" y="-135.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table1 -->
<g id="node3" class="node"><title>table1</title>
<polygon fill="none" stroke="black" points="148.5,-127 148.5,-147 185.5,-147 185.5,-127 148.5,-127"/>
<text text-anchor="start" x="151.448" y="-132.8" font-family="Times,serif" font-size="14.00">index</text>
<polygon fill="none" stroke="black" points="185.5,-127 185.5,-147 221.5,-147 221.5,-127 185.5,-127"/>
<text text-anchor="start" x="188.341" y="-132.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="148.5,-107 148.5,-127 185.5,-127 185.5,-107 148.5,-107"/>
<text text-anchor="start" x="163.5" y="-112.8" font-family="Times,serif" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="185.5,-107 185.5,-127 221.5,-127 221.5,-107 185.5,-107"/>
<text text-anchor="start" x="200" y="-112.8" font-family="Times,serif" font-size="14.00">h</text>
<polygon fill="none" stroke="black" points="148.5,-87 148.5,-107 185.5,-107 185.5,-87 148.5,-87"/>
<text text-anchor="start" x="163.5" y="-92.8" font-family="Times,serif" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="185.5,-87 185.5,-107 221.5,-107 221.5,-87 185.5,-87"/>
<text text-anchor="start" x="200.393" y="-92.8" font-family="Times,serif" font-size="14.00">e</text>
<polygon fill="none" stroke="black" points="148.5,-67 148.5,-87 185.5,-87 185.5,-67 148.5,-67"/>
<text text-anchor="start" x="163.5" y="-72.8" font-family="Times,serif" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="185.5,-67 185.5,-87 221.5,-87 221.5,-67 185.5,-67"/>
<text text-anchor="start" x="201.555" y="-72.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-47 148.5,-67 185.5,-67 185.5,-47 148.5,-47"/>
<text text-anchor="start" x="163.5" y="-52.8" font-family="Times,serif" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="185.5,-47 185.5,-67 221.5,-67 221.5,-47 185.5,-47"/>
<text text-anchor="start" x="201.555" y="-52.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-27 148.5,-47 185.5,-47 185.5,-27 148.5,-27"/>
<text text-anchor="start" x="163.5" y="-32.8" font-family="Times,serif" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="185.5,-27 185.5,-47 221.5,-47 221.5,-27 185.5,-27"/>
<text text-anchor="start" x="200" y="-32.8" font-family="Times,serif" font-size="14.00">o</text>
</g>
<!-- table0&#45;&gt;table1 -->
<g id="edge1" class="edge"><title>table0:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-180C79,-180 101.674,-127.363 137.16,-118.316"/>
<polygon fill="black" stroke="black" points="138.022,-121.734 147.5,-117 137.138,-114.79 138.022,-121.734"/>
</g>
<!-- table3 -->
<g id="node2" class="node"><title>table3</title>
<polyline fill="none" stroke="black" points="8,-84 96,-84 "/>
<text text-anchor="start" x="45.7759" y="-89.8" font-family="Times,serif" font-size="14.00">s2</text>
<polygon fill="none" stroke="black" points="8,-64 8,-84 60,-84 60,-64 8,-64"/>
<text text-anchor="start" x="18.8413" y="-69.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-64 60,-84 96,-84 96,-64 60,-64"/>
<text text-anchor="start" x="62.8413" y="-69.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-44 8,-64 60,-64 60,-44 8,-44"/>
<text text-anchor="start" x="26.2241" y="-49.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-44 60,-64 96,-64 96,-44 60,-44"/>
<polygon fill="none" stroke="black" points="8,-24 8,-44 60,-44 60,-24 8,-24"/>
<text text-anchor="start" x="25.4482" y="-29.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-24 60,-44 96,-44 96,-24 60,-24"/>
<text text-anchor="start" x="74.5" y="-29.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-4 8,-24 60,-24 60,-4 8,-4"/>
<text text-anchor="start" x="10.6826" y="-9.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-4 60,-24 96,-24 96,-4 60,-4"/>
<text text-anchor="start" x="74.5" y="-9.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table3&#45;&gt;table1 -->
<g id="edge2" class="edge"><title>table3:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-54C79,-54 101.674,-106.637 137.16,-115.684"/>
<polygon fill="black" stroke="black" points="137.138,-119.21 147.5,-117 138.022,-112.266 137.138,-119.21"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

117
src/img/trpl04-03.svg Normal file
View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: %3 Pages: 1 -->
<svg
viewBox="0.00 0.00 1000.00 1300.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(4.16667 4.16667) rotate(0) translate(4 298)">
<title>%3</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-298 233,-298 233,4 -4,4"/>
<!-- table0 -->
<g id="node1" class="node"><title>table0</title>
<polyline fill="none" stroke="black" points="8,-124 96,-124 "/>
<text text-anchor="start" x="45.7759" y="-129.8" font-family="Times,serif" font-size="14.00">s1</text>
<polygon fill="none" stroke="black" points="8,-104 8,-124 60,-124 60,-104 8,-104"/>
<text text-anchor="start" x="18.8413" y="-109.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-104 60,-124 96,-124 96,-104 60,-104"/>
<text text-anchor="start" x="62.8413" y="-109.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-84 8,-104 60,-104 60,-84 8,-84"/>
<text text-anchor="start" x="26.2241" y="-89.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-84 60,-104 96,-104 96,-84 60,-84"/>
<polygon fill="none" stroke="black" points="8,-64 8,-84 60,-84 60,-64 8,-64"/>
<text text-anchor="start" x="25.4482" y="-69.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-64 60,-84 96,-84 96,-64 60,-64"/>
<text text-anchor="start" x="74.5" y="-69.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-44 8,-64 60,-64 60,-44 8,-44"/>
<text text-anchor="start" x="10.6826" y="-49.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-44 60,-64 96,-64 96,-44 60,-44"/>
<text text-anchor="start" x="74.5" y="-49.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table1 -->
<g id="node2" class="node"><title>table1</title>
<polygon fill="none" stroke="black" points="148.5,-104 148.5,-124 185.5,-124 185.5,-104 148.5,-104"/>
<text text-anchor="start" x="151.448" y="-109.8" font-family="Times,serif" font-size="14.00">index</text>
<polygon fill="none" stroke="black" points="185.5,-104 185.5,-124 221.5,-124 221.5,-104 185.5,-104"/>
<text text-anchor="start" x="188.341" y="-109.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="148.5,-84 148.5,-104 185.5,-104 185.5,-84 148.5,-84"/>
<text text-anchor="start" x="163.5" y="-89.8" font-family="Times,serif" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="185.5,-84 185.5,-104 221.5,-104 221.5,-84 185.5,-84"/>
<text text-anchor="start" x="200" y="-89.8" font-family="Times,serif" font-size="14.00">h</text>
<polygon fill="none" stroke="black" points="148.5,-64 148.5,-84 185.5,-84 185.5,-64 148.5,-64"/>
<text text-anchor="start" x="163.5" y="-69.8" font-family="Times,serif" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="185.5,-64 185.5,-84 221.5,-84 221.5,-64 185.5,-64"/>
<text text-anchor="start" x="200.393" y="-69.8" font-family="Times,serif" font-size="14.00">e</text>
<polygon fill="none" stroke="black" points="148.5,-44 148.5,-64 185.5,-64 185.5,-44 148.5,-44"/>
<text text-anchor="start" x="163.5" y="-49.8" font-family="Times,serif" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="185.5,-44 185.5,-64 221.5,-64 221.5,-44 185.5,-44"/>
<text text-anchor="start" x="201.555" y="-49.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-24 148.5,-44 185.5,-44 185.5,-24 148.5,-24"/>
<text text-anchor="start" x="163.5" y="-29.8" font-family="Times,serif" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="185.5,-24 185.5,-44 221.5,-44 221.5,-24 185.5,-24"/>
<text text-anchor="start" x="201.555" y="-29.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-4 148.5,-24 185.5,-24 185.5,-4 148.5,-4"/>
<text text-anchor="start" x="163.5" y="-9.8" font-family="Times,serif" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="185.5,-4 185.5,-24 221.5,-24 221.5,-4 185.5,-4"/>
<text text-anchor="start" x="200" y="-9.8" font-family="Times,serif" font-size="14.00">o</text>
</g>
<!-- table0&#45;&gt;table1 -->
<g id="edge1" class="edge"><title>table0:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-94C79,-94 109.186,-94 137.297,-94"/>
<polygon fill="black" stroke="black" points="137.5,-97.5001 147.5,-94 137.5,-90.5001 137.5,-97.5001"/>
</g>
<!-- table3 -->
<g id="node3" class="node"><title>table3</title>
<polyline fill="none" stroke="black" points="8,-270 96,-270 "/>
<text text-anchor="start" x="45.7759" y="-275.8" font-family="Times,serif" font-size="14.00">s2</text>
<polygon fill="none" stroke="black" points="8,-250 8,-270 60,-270 60,-250 8,-250"/>
<text text-anchor="start" x="18.8413" y="-255.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-250 60,-270 96,-270 96,-250 60,-250"/>
<text text-anchor="start" x="62.8413" y="-255.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-230 8,-250 60,-250 60,-230 8,-230"/>
<text text-anchor="start" x="26.2241" y="-235.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-230 60,-250 96,-250 96,-230 60,-230"/>
<polygon fill="none" stroke="black" points="8,-210 8,-230 60,-230 60,-210 8,-210"/>
<text text-anchor="start" x="25.4482" y="-215.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-210 60,-230 96,-230 96,-210 60,-210"/>
<text text-anchor="start" x="74.5" y="-215.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-190 8,-210 60,-210 60,-190 8,-190"/>
<text text-anchor="start" x="10.6826" y="-195.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-190 60,-210 96,-210 96,-190 60,-190"/>
<text text-anchor="start" x="74.5" y="-195.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table4 -->
<g id="node4" class="node"><title>table4</title>
<polygon fill="none" stroke="black" points="148.5,-250 148.5,-270 185.5,-270 185.5,-250 148.5,-250"/>
<text text-anchor="start" x="151.448" y="-255.8" font-family="Times,serif" font-size="14.00">index</text>
<polygon fill="none" stroke="black" points="185.5,-250 185.5,-270 221.5,-270 221.5,-250 185.5,-250"/>
<text text-anchor="start" x="188.341" y="-255.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="148.5,-230 148.5,-250 185.5,-250 185.5,-230 148.5,-230"/>
<text text-anchor="start" x="163.5" y="-235.8" font-family="Times,serif" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="185.5,-230 185.5,-250 221.5,-250 221.5,-230 185.5,-230"/>
<text text-anchor="start" x="200" y="-235.8" font-family="Times,serif" font-size="14.00">h</text>
<polygon fill="none" stroke="black" points="148.5,-210 148.5,-230 185.5,-230 185.5,-210 148.5,-210"/>
<text text-anchor="start" x="163.5" y="-215.8" font-family="Times,serif" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="185.5,-210 185.5,-230 221.5,-230 221.5,-210 185.5,-210"/>
<text text-anchor="start" x="200.393" y="-215.8" font-family="Times,serif" font-size="14.00">e</text>
<polygon fill="none" stroke="black" points="148.5,-190 148.5,-210 185.5,-210 185.5,-190 148.5,-190"/>
<text text-anchor="start" x="163.5" y="-195.8" font-family="Times,serif" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="185.5,-190 185.5,-210 221.5,-210 221.5,-190 185.5,-190"/>
<text text-anchor="start" x="201.555" y="-195.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-170 148.5,-190 185.5,-190 185.5,-170 148.5,-170"/>
<text text-anchor="start" x="163.5" y="-175.8" font-family="Times,serif" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="185.5,-170 185.5,-190 221.5,-190 221.5,-170 185.5,-170"/>
<text text-anchor="start" x="201.555" y="-175.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-150 148.5,-170 185.5,-170 185.5,-150 148.5,-150"/>
<text text-anchor="start" x="163.5" y="-155.8" font-family="Times,serif" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="185.5,-150 185.5,-170 221.5,-170 221.5,-150 185.5,-150"/>
<text text-anchor="start" x="200" y="-155.8" font-family="Times,serif" font-size="14.00">o</text>
</g>
<!-- table3&#45;&gt;table4 -->
<g id="edge2" class="edge"><title>table3:pointer:c&#45;&gt;table4:pointee</title>
<path fill="none" stroke="black" d="M79,-240C79,-240 109.186,-240 137.297,-240"/>
<polygon fill="black" stroke="black" points="137.5,-243.5 147.5,-240 137.5,-236.5 137.5,-243.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

91
src/img/trpl04-04.svg Normal file
View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: %3 Pages: 1 -->
<svg
viewBox="0.00 0.00 1000.00 1000.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(4.16667 4.16667) rotate(0) translate(4 238)">
<title>%3</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-238 233,-238 233,4 -4,4"/>
<!-- table0 -->
<g id="node1" class="node"><title>table0</title>
<polygon fill="gray" stroke="none" points="8,-130 8,-230 96,-230 96,-130 8,-130"/>
<polyline fill="none" stroke="black" points="8,-210 96,-210 "/>
<text text-anchor="start" x="45.7759" y="-215.8" font-family="Times,serif" font-size="14.00">s1</text>
<polygon fill="none" stroke="black" points="8,-190 8,-210 60,-210 60,-190 8,-190"/>
<text text-anchor="start" x="18.8413" y="-195.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-190 60,-210 96,-210 96,-190 60,-190"/>
<text text-anchor="start" x="62.8413" y="-195.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-170 8,-190 60,-190 60,-170 8,-170"/>
<text text-anchor="start" x="26.2241" y="-175.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-170 60,-190 96,-190 96,-170 60,-170"/>
<polygon fill="none" stroke="black" points="8,-150 8,-170 60,-170 60,-150 8,-150"/>
<text text-anchor="start" x="25.4482" y="-155.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-150 60,-170 96,-170 96,-150 60,-150"/>
<text text-anchor="start" x="74.5" y="-155.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-130 8,-150 60,-150 60,-130 8,-130"/>
<text text-anchor="start" x="10.6826" y="-135.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-130 60,-150 96,-150 96,-130 60,-130"/>
<text text-anchor="start" x="74.5" y="-135.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table1 -->
<g id="node3" class="node"><title>table1</title>
<polygon fill="none" stroke="black" points="148.5,-127 148.5,-147 185.5,-147 185.5,-127 148.5,-127"/>
<text text-anchor="start" x="151.448" y="-132.8" font-family="Times,serif" font-size="14.00">index</text>
<polygon fill="none" stroke="black" points="185.5,-127 185.5,-147 221.5,-147 221.5,-127 185.5,-127"/>
<text text-anchor="start" x="188.341" y="-132.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="148.5,-107 148.5,-127 185.5,-127 185.5,-107 148.5,-107"/>
<text text-anchor="start" x="163.5" y="-112.8" font-family="Times,serif" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="185.5,-107 185.5,-127 221.5,-127 221.5,-107 185.5,-107"/>
<text text-anchor="start" x="200" y="-112.8" font-family="Times,serif" font-size="14.00">h</text>
<polygon fill="none" stroke="black" points="148.5,-87 148.5,-107 185.5,-107 185.5,-87 148.5,-87"/>
<text text-anchor="start" x="163.5" y="-92.8" font-family="Times,serif" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="185.5,-87 185.5,-107 221.5,-107 221.5,-87 185.5,-87"/>
<text text-anchor="start" x="200.393" y="-92.8" font-family="Times,serif" font-size="14.00">e</text>
<polygon fill="none" stroke="black" points="148.5,-67 148.5,-87 185.5,-87 185.5,-67 148.5,-67"/>
<text text-anchor="start" x="163.5" y="-72.8" font-family="Times,serif" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="185.5,-67 185.5,-87 221.5,-87 221.5,-67 185.5,-67"/>
<text text-anchor="start" x="201.555" y="-72.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-47 148.5,-67 185.5,-67 185.5,-47 148.5,-47"/>
<text text-anchor="start" x="163.5" y="-52.8" font-family="Times,serif" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="185.5,-47 185.5,-67 221.5,-67 221.5,-47 185.5,-47"/>
<text text-anchor="start" x="201.555" y="-52.8" font-family="Times,serif" font-size="14.00">l</text>
<polygon fill="none" stroke="black" points="148.5,-27 148.5,-47 185.5,-47 185.5,-27 148.5,-27"/>
<text text-anchor="start" x="163.5" y="-32.8" font-family="Times,serif" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="185.5,-27 185.5,-47 221.5,-47 221.5,-27 185.5,-27"/>
<text text-anchor="start" x="200" y="-32.8" font-family="Times,serif" font-size="14.00">o</text>
</g>
<!-- table0&#45;&gt;table1 -->
<g id="edge1" class="edge"><title>table0:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-180C79,-180 101.674,-127.363 137.16,-118.316"/>
<polygon fill="black" stroke="black" points="138.022,-121.734 147.5,-117 137.138,-114.79 138.022,-121.734"/>
</g>
<!-- table3 -->
<g id="node2" class="node"><title>table3</title>
<polyline fill="none" stroke="black" points="8,-84 96,-84 "/>
<text text-anchor="start" x="45.7759" y="-89.8" font-family="Times,serif" font-size="14.00">s2</text>
<polygon fill="none" stroke="black" points="8,-64 8,-84 60,-84 60,-64 8,-64"/>
<text text-anchor="start" x="18.8413" y="-69.8" font-family="Times,serif" font-size="14.00">name</text>
<polygon fill="none" stroke="black" points="60,-64 60,-84 96,-84 96,-64 60,-64"/>
<text text-anchor="start" x="62.8413" y="-69.8" font-family="Times,serif" font-size="14.00">value</text>
<polygon fill="none" stroke="black" points="8,-44 8,-64 60,-64 60,-44 8,-44"/>
<text text-anchor="start" x="26.2241" y="-49.8" font-family="Times,serif" font-size="14.00">ptr</text>
<polygon fill="none" stroke="black" points="60,-44 60,-64 96,-64 96,-44 60,-44"/>
<polygon fill="none" stroke="black" points="8,-24 8,-44 60,-44 60,-24 8,-24"/>
<text text-anchor="start" x="25.4482" y="-29.8" font-family="Times,serif" font-size="14.00">len</text>
<polygon fill="none" stroke="black" points="60,-24 60,-44 96,-44 96,-24 60,-24"/>
<text text-anchor="start" x="74.5" y="-29.8" font-family="Times,serif" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="8,-4 8,-24 60,-24 60,-4 8,-4"/>
<text text-anchor="start" x="10.6826" y="-9.8" font-family="Times,serif" font-size="14.00">capacity</text>
<polygon fill="none" stroke="black" points="60,-4 60,-24 96,-24 96,-4 60,-4"/>
<text text-anchor="start" x="74.5" y="-9.8" font-family="Times,serif" font-size="14.00">5</text>
</g>
<!-- table3&#45;&gt;table1 -->
<g id="edge2" class="edge"><title>table3:pointer:c&#45;&gt;table1:pointee</title>
<path fill="none" stroke="black" d="M79,-54C79,-54 101.674,-106.637 137.16,-115.684"/>
<polygon fill="black" stroke="black" points="137.138,-119.21 147.5,-117 138.022,-112.266 137.138,-119.21"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB