• Main Page
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/clp-1.11.1/Clp/src/ClpParameters.hpp

Go to the documentation of this file.
00001 /* $Id: ClpParameters.hpp 1458 2009-11-05 12:34:07Z forrest $ */
00002 // Copyright (C) 2000, 2002, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 
00005 #ifndef _ClpParameters_H
00006 #define _ClpParameters_H
00007 
00011 enum ClpIntParam {
00014   ClpMaxNumIteration = 0,
00017   ClpMaxNumIterationHotStart,
00036   ClpNameDiscipline,
00039   ClpLastIntParam
00040 };
00041 
00042 enum ClpDblParam {
00046   ClpDualObjectiveLimit,
00050   ClpPrimalObjectiveLimit,
00053   ClpDualTolerance,
00056   ClpPrimalTolerance,
00059   ClpObjOffset,
00061   ClpMaxSeconds,
00063   ClpPresolveTolerance,
00066   ClpLastDblParam
00067 };
00068 
00069 
00070 enum ClpStrParam {
00073   ClpProbName = 0,
00076   ClpLastStrParam
00077 };
00078 
00080 template <class T> inline void
00081 ClpDisjointCopyN( const T * array, const int size, T * newArray)
00082 {
00083   memcpy(reinterpret_cast<void *> (newArray),array,size*sizeof(T));
00084 }
00086 template <class T> inline void
00087 ClpFillN( T * array, const int size, T value)
00088 {
00089   int i;
00090   for (i=0;i<size;i++)
00091     array[i]=value;
00092 }
00094 template <class T> inline T*
00095 ClpCopyOfArray( const T * array, const int size, T value)
00096 {
00097   T * arrayNew = new T[size];
00098   if (array) 
00099     ClpDisjointCopyN(array,size,arrayNew);
00100   else
00101     ClpFillN ( arrayNew, size,value);
00102   return arrayNew;
00103 }
00104 
00106 template <class T> inline T*
00107 ClpCopyOfArray( const T * array, const int size)
00108 {
00109   if (array) {
00110     T * arrayNew = new T[size];
00111     ClpDisjointCopyN(array,size,arrayNew);
00112     return arrayNew;
00113   } else {
00114     return NULL;
00115   }
00116 }
00118 typedef struct {
00119   int typeStruct; // allocated as 1,2 etc
00120   int typeCall;
00121   void * data;
00122 } ClpTrustedData;
00123 #endif

Generated on Fri Aug 20 2010 06:29:28 by  doxygen 1.7.1