- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.52.0/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,
    00035   ClpNameDiscipline,
    00038   ClpLastIntParam
    00039 };
    00040
    00041 enum ClpDblParam {
    00045   ClpDualObjectiveLimit,
    00049   ClpPrimalObjectiveLimit,
    00052   ClpDualTolerance,
    00055   ClpPrimalTolerance,
    00058   ClpObjOffset,
    00060   ClpMaxSeconds,
    00062   ClpPresolveTolerance,
    00065   ClpLastDblParam
    00066 };
    00067
    00068
    00069 enum ClpStrParam {
    00072   ClpProbName = 0,
    00075   ClpLastStrParam
    00076 };
    00077
    00079 template <class T> inline void
    00080 ClpDisjointCopyN( const T * array, const int size, T * newArray)
    00081 {
    00082   memcpy((void *) newArray,array,size*sizeof(T));
    00083 }
    00085 template <class T> inline void
    00086 ClpFillN( T * array, const int size, T value)
    00087 {
    00088   int i;
    00089   for (i=0;i<size;i++)
    00090     array[i]=value;
    00091 }
    00093 template <class T> inline T*
    00094 ClpCopyOfArray( const T * array, const int size, T value)
    00095 {
    00096   T * arrayNew = new T[size];
    00097   if (array)
    00098     ClpDisjointCopyN(array,size,arrayNew);
    00099   else
    00100     ClpFillN ( arrayNew, size,value);
    00101   return arrayNew;
    00102 }
    00103
    00105 template <class T> inline T*
    00106 ClpCopyOfArray( const T * array, const int size)
    00107 {
    00108   if (array) {
    00109     T * arrayNew = new T[size];
    00110     ClpDisjointCopyN(array,size,arrayNew);
    00111     return arrayNew;
    00112   } else {
    00113     return NULL;
    00114   }
    00115 }
    00116 #endif