DirectSearch is the abstract base class for the PatternSearch and SimplexSearch classes
DirectSearch is the abstract base class for the PatternSearch and SimplexSearch classes. It contains:
- --constructors,
- --a virtual destructor,
- --data members that will be used throughout all the classes,
- --accessors for these data members,
- --virtual void placeholders for the algorithmic member functions to be implemented in the concrete classes, and
- --a few utility functions.
This constructor takes five input parameters.
Constructors and destructor
DirectSearch(long dim, Vector<double> &startPoint)
startpoint - the start point for the search DirectSearch(const DirectSearch & Original)
DirectSearch(long dim, Vector<double> &startPoint, double stopStep, void (*objective)(long vars, Vector<double> &x, double &func, bool &flag, void* an_obj), void * input_obj)
startPoint - a Vector of doubles, the starting point for the search
stopStep - the stopping step length for the search
objective - a pointer to the function to be minimized
input_obj - used to send additional data as needed--will normally be set to NULL. virtual ~DirectSearch()
DirectSearch& operator=(const DirectSearch& A)
Other initialization methods
virtual void ReadInFile(istream & fp)
virtual void CleanSlate(long dim, Vector<double> & startPoint)
startPoint - the new starting point for the search
virtual void CleanSlate(long dim, Vector<double> &startPoint, double stopStep, void (*objective)(long vars, Vector<double> &x, double &func, bool &flag, void* an_obj), void * input_obj)
startPoint - a Vector of doubles, the starting point for the search
stopStep - the stopping step length for the search
objective - a pointer to the function to be minimized
input_obj - used to send additional data as needed--will normally be set to NULL.
void InitializeDesign(const Matrix<double> *designPtr)
pat - a pointer to a design matrix
virtual void PrintDesign() const
Search method
Accessors and Mutators
long GetFunctionCalls() const
void SetFunctionCalls(long newCalls)
int GetID() const
void GetMinPoint(Vector<double> & minimum) const
void SetMinPoint(Vector<double> & minimum) const
void GetMinVal(double & value) const
void SetMinVal(double & value)
long GetDimension() const
long GetMaxCalls() const
void SetMaxCalls(long calls)
void SetMaxCallsExact(long calls)
Matrix <double> * GetDesign()
void CopyDesign(Matrix<double>* &designPtr) const
double GetStoppingStepLength() const
void SetStoppingStepLength(double len)
virtual void SetExact()
virtual void SetInexact()
virtual bool IsExact()
virtual void ExploratoryMoves()
virtual bool Stop()
void fcnCall(long n, Vector<double> &x, double & f, bool& flag, void * nothing)
x - the point at which to evaluate the function
f - upon return will hold the function value at the point x
flag - indicates whether the evaluation was possible
nothing - a pointer to be used in cases where extra information is needed. Will usually be set to NULL.
virtual void CopySearch(const DirectSearch & Original)
bool BreakOnExact()
Matrix <double> * design
long dimension
Vector <double> * minPoint
double minValue
long functionCalls
long maxCalls
double stoppingStepLength
void* some_object
void (*fcn_name)(long dim, Vector<double> &x, double & function, bool & success, void* an_object)
bool exact_count
int IDnumber
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de