| OCR Text |
Show 110 Because the CellMatrix will be used throughout ACME and is an important part of the hierarchical design model, it is important that it be more space-efficient than the simple array example given above. This appendix describes two data structures: the DynArray and the CellTree, that were used to provide both a space- and time-efficient implementation for the CellMatrix. These data structures are also sufficiently general to be used throughout ACME to implement a variety of data structures. The DynArray, DynArray Row and CellTree were used throughout ACME for the implementation of the CellMatrix, ShapeArray, StateArray, WireArray and ViaArray (the via container). A .l The DynArray The DynArray organization is shown in Figure A.L It consists of a row block and a set of DynArray Row objects. The row block stores a pointer to each one of the DynArrayRow objects. Elements of the DynArray (typically cells) are stored in the DynArrayRow objects. For example, in the figure, a cell with its origin at (3,2) would be stored in location (2) of the DynArrayRow object pointed to by location (3) in the row block. Although the DynArray shown in the figure has an origin of (0, 0), the DynArray can have its origin anywhere. Throughout this discussion, it is assumed that the DynArray is organized as shown, i.e., row-major order. However, this is only for conceptual convenience so that the terms left and right have some meaning. The DynArray could be implemented in column-major order as well. The DynArrayRow is a virtual class, i.e., it defines only an interface and provides no storage. Programmers using the DynArray must declare a new row class that inherits from the DynArrayRow class and then define the functionality of all of the relevant virtual methods. DynArray functionality is a composite of the intrinsic DynArray functionality (operations on the row block) and the DynArrayRow functionality. That is, each function defined on the DynArray operates both on the row block and the set of DynArrayRow objects. For example, consider the following algorithm for computing the bounding box, that is, the (least x, greatest x, least y, greatest y) that represents the area occupied by elements stored in the DynArray. This algorithm assumes that the functions DLeftBound |