Go to the documentation of this file.00001
00002
00003
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;
00120 int typeCall;
00121 void * data;
00122 } ClpTrustedData;
00123 #endif