From 918ca76a7b855ae376959d6281eaeb1fb116d1e4 Mon Sep 17 00:00:00 2001 From: Krzysztof Wojtas Date: Tue, 24 Sep 2024 09:34:39 +0200 Subject: [PATCH] #225 fix picture labels --- chapter6/sections/2/1.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter6/sections/2/1.tex b/chapter6/sections/2/1.tex index a65abf3..bc52670 100644 --- a/chapter6/sections/2/1.tex +++ b/chapter6/sections/2/1.tex @@ -1,13 +1,13 @@ -See \refFigure{6.1-2}. +See \refFigure{6.2-1}. \begin{figure}[htb] \captionsetup[subfigure]{} - \subcaptionbox{\label{fig:6.1-2a}}[0.5\textwidth]{\input{1a.tikz}} - \subcaptionbox{\label{fig:6.1-2b}}[0.5\textwidth]{\input{1b.tikz}} + \subcaptionbox{\label{fig:6.2-1a}}[0.5\textwidth]{\input{1a.tikz}} + \subcaptionbox{\label{fig:6.2-1b}}[0.5\textwidth]{\input{1b.tikz}} \par\vspace{5mm} - \subcaptionbox{\label{fig:6.1-2c}}[0.5\textwidth]{\input{1c.tikz}} + \subcaptionbox{\label{fig:6.2-1c}}[0.5\textwidth]{\input{1c.tikz}} \caption{The operation of $\proc{Max-Heapify}(A,3)$ on the array $A=\langle$27, 17, 3, 16, 13, 10, 1, 5, 7, 12, 4, 8, 9, 0$\rangle$, where $\attrib{A}{heap-size}=14$.\, \textbf{(a)}\, The element $A[3]$ at node $i=3$ violates the max-heap property, since it is not larger than its left child $A[6]$. \textbf{(b)}\, After exchanging $A[3]$ with $A[6]$ the max-heap property is restored for node 3, but is destroyed for node 6, because now $A[6]$ is not larger than both children. In the recursive call $\proc{Max-Heapify}(A,6)$ the elements $A[6]$ and $A[13]$ are swapped, as shown in \textbf{(c)}. - The next recursive call $\proc{Max-Heapify}(A,13)$ just returns without making any further changes to the heap.} \label{fig:6.1-2} + The next recursive call $\proc{Max-Heapify}(A,13)$ just returns without making any further changes to the heap.} \label{fig:6.2-1} \end{figure}