The ListOfPoints Class

The ListOfPoints Class

This class represents a variable list or array of Points. The interface to the class allows the programmer to add Points to the end of the list, and access points through array indices. Sublists can also be generated, as well as the single arithmetic function ``average'', which calculates a new point which is the affine average of all the points in the list.

To Obtain the Class

To obtain the ListOfPoints class you need both the include file ListOfPoints.h and the source code file ListOfPoints.C.

The user must also include the Point class for the ListOfPoints class to operate correctly

Make Sure to Also Include...

Be sure to include the following lines in your source code file, as these routines utilize them.

            #include <stdlib.h>
            #include <math.h>
            #include <stream.h>
            #include <strings.h>
Also, if you wish to use UNIX commands (exevlp, system, sleep, etc.) in your program, you should also have
            #include <unistd.h>

This class does not keep a linked list of Points, but maintains an array of Points, which is set at a certain size initially, and then expanded in chunks when it is necessary. Externally this is not visible to the user of the class, but when modifying the class, this fact must be taken into consideration.

This class was generated for a research system at UC Davis and has worked in a variety of situations. Unfortunately, this is not a guarantee that it will work in your situation. You may use it ``as is'' or can modify it. If you find errors, and can correct them, please send mail to the address below, as we would also like to know about them.

This document maintained by Ken Joy.
Comments to the author : joy@cs.ucdavis.edu

All contents copyright (c) 1998
Computer Science Department, University of California, Davis
All rights reserved.



Ken Joy
Wed Jan 7 14:58:28 PST 1998