/home/coin/SVN-release/Cbc-1.1.1/Clp/src/ClpParameters.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, 2002, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 #ifndef _ClpParameters_H
00005 #define _ClpParameters_H
00006 
00010 enum ClpIntParam {
00013   ClpMaxNumIteration = 0,
00016   ClpMaxNumIterationHotStart,
00019   ClpLastIntParam
00020 };
00021 
00022 enum ClpDblParam {
00026   ClpDualObjectiveLimit,
00030   ClpPrimalObjectiveLimit,
00033   ClpDualTolerance,
00036   ClpPrimalTolerance,
00039   ClpObjOffset,
00041   ClpMaxSeconds,
00043   ClpPresolveTolerance,
00046   ClpLastDblParam
00047 };
00048 
00049 
00050 enum ClpStrParam {
00053   ClpProbName = 0,
00056   ClpLastStrParam
00057 };
00058 
00060 template <class T> inline void
00061 ClpDisjointCopyN( const T * array, const int size, T * newArray)
00062 {
00063   memcpy((void *) newArray,array,size*sizeof(T));
00064 }
00066 template <class T> inline void
00067 ClpFillN( T * array, const int size, T value)
00068 {
00069   int i;
00070   for (i=0;i<size;i++)
00071     array[i]=value;
00072 }
00074 template <class T> inline T*
00075 ClpCopyOfArray( const T * array, const int size, T value)
00076 {
00077   T * arrayNew = new T[size];
00078   if (array) 
00079     ClpDisjointCopyN(array,size,arrayNew);
00080   else
00081     ClpFillN ( arrayNew, size,value);
00082   return arrayNew;
00083 }
00084 
00086 template <class T> inline T*
00087 ClpCopyOfArray( const T * array, const int size)
00088 {
00089   if (array) {
00090     T * arrayNew = new T[size];
00091     ClpDisjointCopyN(array,size,arrayNew);
00092     return arrayNew;
00093   } else {
00094     return NULL;
00095   }
00096 }
00097 #endif

Generated on Thu May 15 21:59:05 2008 by  doxygen 1.4.7