Dismiss
InnovationQ will be updated on Sunday, Jan. 21, from 9am - 11am ET. You may experience brief service interruptions during that time.
Browse Prior Art Database

# Rapid Algorithm for Generating Rectangular Tables

IP.com Disclosure Number: IPCOM000119289D
Original Publication Date: 1991-Jan-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 4 page(s) / 124K

IBM

## Related People

Hiraga, R: AUTHOR [+2]

## Abstract

Disclosed is a method for identifying rectangular units of various sizes, which is less complex than existing methods. It uses a graphical editor to generate the layout of tables. From the location of lines and vertices, cells of a table are automatically identified.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Rapid Algorithm for Generating Rectangular Tables

Disclosed is a method for identifying rectangular units
of various sizes, which is less complex than existing methods. It
uses a graphical editor to generate the layout of tables. From the
location of lines and vertices, cells of a table are automatically
identified.

The layout editor has an edit mode and a simulation mode. In
the edit mode, a table consisting of horizontal and vertical lines is
generated by clicking a mouse. Internally, a mouse click is used to
identify the state. The internal states are: "init," "first," "line,"
and "rectangle." Starting from the "Init" state, the first mouse
click changes the state into "first." When two successive points
selected by mouse clicks have the same x coordinate (x value) or the
same y coordinate (y value), then a line is drawn and a state
transition to "line" occurs. When two successive points share neither
x value nor y value, then a rectangle with these two points as
diagonal points is drawn with a state transition to "rectangle." If
two successive points are the same, then that point is cancelled. The
state transition diagram is shown in Fig. 1.

In the simulation mode, a mouse click is used to identify a
cell.  When the mouse click is at a point in a rectangle, the
corresponding cell including the point is highlighted.

The proposed method consists of two key algorithms: one for
making a set of rectangles in the edit mode and one for highlighting
a cell in the simulation mode. Definitions of terms used in the
algorithm are given in Table 1. Several sets are used in the
algorithms.  All the sets are assumed to be sorted in certain ways
for a binary search.

In the edit mode, all rectangles are found from the information
on points and lines obtained at the time of drawing. The algorithm
for identifying rectangles is as follows:

1.  Identify and store points and lines when a state transition
to either the "line" state or the "rectangle" state occurs. When the
state is changed to "line," two end points are added to a set of
points P. A line specified by two end points is added to a set of
lines; a vertical line to L_v, and a horizontal line to L_h. When the
state is changed to "rectangle," four points of the specified
rectangle are added to P, and four lines of the rectangle to L_v and...