/* CompassSearch.h 
 * header file for a search based on the class PatternSearch.
 * A compass search checks the positive and negative quardinate vectors for
 * each dimension until improvement in the function values is found.  
 * The search then relocates to the improving point and begins again.
 * Liz Dolan, The College of William and Mary, 1999
 *
 *                                                                 
 *  The author of this software is Elizabeth  D. Dolan.                     
 *  Permission to use, copy, modify, and distribute this software  
 *  for any purpose without fee is hereby granted, provided that   
 *  this entire notice is included in all copies of any software   
 *  which is or includes a copy or modification of this software   
 *  and in all copies of the supporting documentation for such     
 *  software.  THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT    
 *  ANY EXPRESS OR IMPLIED WARRANTY.  IN PARTICULAR, THE AUTHOR    
 *  OFFERS NO REPRESENTATION OR WARRANTY OF ANY KIND                   
 *  CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS    
 *  FITNESS FOR ANY PARTICULAR PURPOSE.                            
 */                                                                 

#ifndef _CompassSearch_
#define _CompassSearch_

#include "PatternSearch.h"

class CompassSearch: public PatternSearch
{

  public :
  CompassSearch(int numberOfVariables); 
  //the dimensions of the search space are required for the constructor
  ~CompassSearch();

  void ExploratoryMoves();
  //searches in compass directions for a better solution to the objective function
  private:

  void CreatePattern();
  //initializes the pattern to one that contains one positive 
  //and one negative unit vector in each of the compass directions
  void UpdatePattern();
  //scales the pattern trial steps to search half as far in each direction

};//class CompassSearch


#endif








