Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Status.h

00001 /* OOQP                                                               *
00002  * Authors: E. Michael Gertz, Stephen J. Wright                       *
00003  * (C) 2001 University of Chicago. See Copyright Notification in OOQP */
00004 
00005 #ifndef STATUS_H
00006 #define STATUS_H
00007 
00008 class Solver;
00009 class Data;
00010 class Variables;
00011 class Residuals;
00012 
00013 enum TerminationCode 
00014 {
00015   SUCCESSFUL_TERMINATION = 0,
00016   NOT_FINISHED,
00017   MAX_ITS_EXCEEDED,
00018   INFEASIBLE,
00019   UNKNOWN
00020 };
00021 
00022 extern const char * TerminationStrings[]; 
00023 
00029 class Status
00030 {
00031 public:
00032   virtual int doIt(  Solver * solver, Data * data, Variables * vars, 
00033                      Residuals * resids,
00034                      int i, double mu,
00035                      int level ) = 0;
00036   virtual ~Status();
00037 };
00038 
00042 struct StatusData {
00043   void * solver;
00044   void * data;
00045   void * vars;
00046   void * resids;
00047   int i;
00048   double mu;
00049   double dnorm;
00050   int level;
00051   void * ctx;
00052 };
00053 
00054 extern "C" {
00055   typedef int (*StatusCFunc)( void * data );
00056 }
00057 
00058 
00064 class CStatus : public Status {
00065 protected:
00066   StatusCFunc doItC;
00067   void * ctx;
00068 public:
00069   CStatus( StatusCFunc doItC_, void * ctx );
00070   virtual int doIt(  Solver * solver, Data * data, Variables * vars, 
00071                      Residuals * resids,
00072                      int i, double mu, 
00073                      int level );
00074 };
00075 
00076 #endif
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 

Generated on Mon May 24 17:40:46 2004 for OOQP by doxygen1.2.18