
// UNSORTEDARRAY.H   

const int MAXSIZE = 20000;


class UnSortedArray {

      private:

         int loIndex, hiIndex; 
         Individual *everyone[MAXSIZE];       //  The array of individuals.

      protected:


      public:

         UnSortedArray() { };                 //  Default constructor.
         void InitializeFromFile();           //  Read in a file of chromosomes from "input"
         boolean Empty();                     //  Returns true if no individuals in array.
         boolean Member(Individual *indi);    //  Returns true if indi is in current array.
         int IndexOf(Individual *indi);       //  Returns position of indi in current array.
                                              //   returns -1 if not in array.
         void printEveryone();                //  Prints each chromosome on a separate line, to
                                              //   console.
         void print_totalnumber();            //  Prints total number of chromosomes stored in array.
         int GET_hiIndex();                   //  Returns the current value of hiIindex, which is the
                                              //  index of the last element stored in the array..
         int GET_loIndex();                   //  Returns the current value of loIindex, which is the
                                              //  index of the first element stored in the array.

         Individual *Retrieve(int index);     //  Return a ptr to the individual in the position 
                                              //  "index" of the everyone array.  
                                              //  Note:  loIndex <= index <= hiIndex.
};

