next up previous contents index
Next: Chunk Class Up: Window Class Previous: Operations

Comparison Schemes


  
Figure 3.17: Scheme for Window Comparison
\begin{figure}
\begin{center}

\includegraphics [scale=0.8]{windowcomparison.ps}
\end{center}\end{figure}

The class implements the SortableObject interface and can be compared with another Window object or an offset. Additionally, there are two comparison operations with another Window object. One is the isContainedBy(window), the other is isSeparatedFrom(window). They function as their names suggest.

The most complicated issue on the comparison schemes for the Window object is that there are two different comparison schemes. One scheme is just checking whether the compared offset is before, after, or within the mapped range of the Window object.

The other scheme (See Figure 3.17) is fragmentation-sensitive. The equality zone of the mapped region is the region which contains only non-fragmented objects. When the compared offset is within the equality zone, the offset is equal to the Window object. When the compared offset is before or after the equality zone, the offset is smaller or larger than the Window object, respectively.

On the other hand, the scheme for comparison with another Window object is fairly simple. The beginning offsets of the Windows serve as the keys for comparison. If the keys are equal, the larger Window is the larger.


next up previous contents index
Next: Chunk Class Up: Window Class Previous: Operations
Mori Tetsuya / t2y3141592@gmail.com