Browse Prior Art Database

Two File Processing Algorithms: Index and Next

IP.com Disclosure Number: IPCOM000076841D
Original Publication Date: 1972-May-01
Included in the Prior Art Database: 2005-Feb-24
Document File: 3 page(s) / 20K

Publishing Venue

IBM

Related People

Reynolds, SW: AUTHOR

Abstract

Two related algorithms which are useful in file processing are described.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 3

Two File Processing Algorithms: Index and Next

Two related algorithms which are useful in file processing are described.

The algorithms to be presented, INDEX and NEXT, work in either 0 or 1 origin indexing and both will operate on either numeric or character vectors. INDEX yields as a result the indices of the leading character of each and every word in a vector file which is identical to a given word, of a given word length, or of a given word length and with specified characters in designated character positions. NEXT has the same properties as INDEX, but yields as a result only one index. This index is that of the leading character of the next occurrence of the given word from a global pointer (PNT) position to the end of the file. After execution the pointer is incremented by one but is not wrapped around the file.

Before describing the functions, it should be noted that both functions require two integer vectors (FD and S) which are word delimiters but which are not members of the given file. Both vectors are treated as global variables to avoid their recalculation every time these functions are executed. Speed of function execution has been considered to be more critical than space limitation.

The file F is a logically contiguous, homogeneous set of vectors of either characters or numbers. Intended "words" in the file are delimited by either vector FD or vector S. Once either vector is specified, the other is readily computed.

The components of vector FD are positive integers representing lengths of each and every word in the file. The components of vector S are monotonically increasing positive integers representing indices of the leading character of every file word. Computation of S or FD

(Image Omitted)

INDEX - A given word W is the argument of this monadic function. The explicit result is a vector of integers representing indices of the leading character of each and ever...