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

- File List
- File Members

# /home/coin/svn-release/Alps-1.4.8/Clp/src/ClpParameters.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpParameters.hpp 1665 2011-01-04 17:55:54Z lou $ */
    00002 // Copyright (C) 2000, 2002, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef _ClpParameters_H
    00007 #define _ClpParameters_H
    00008
    00012 enum ClpIntParam {
    00015      ClpMaxNumIteration = 0,
    00018      ClpMaxNumIterationHotStart,
    00037      ClpNameDiscipline,
    00040      ClpLastIntParam
    00041 };
    00042
    00043 enum ClpDblParam {
    00047      ClpDualObjectiveLimit,
    00051      ClpPrimalObjectiveLimit,
    00054      ClpDualTolerance,
    00057      ClpPrimalTolerance,
    00060      ClpObjOffset,
    00062      ClpMaxSeconds,
    00064      ClpPresolveTolerance,
    00067      ClpLastDblParam
    00068 };
    00069
    00070
    00071 enum ClpStrParam {
    00074      ClpProbName = 0,
    00077      ClpLastStrParam
    00078 };
    00079
    00081 template <class T> inline void
    00082 ClpDisjointCopyN( const T * array, const int size, T * newArray)
    00083 {
    00084      memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
    00085 }
    00087 template <class T> inline void
    00088 ClpFillN( T * array, const int size, T value)
    00089 {
    00090      int i;
    00091      for (i = 0; i < size; i++)
    00092           array[i] = value;
    00093 }
    00095 template <class T> inline T*
    00096 ClpCopyOfArray( const T * array, const int size, T value)
    00097 {
    00098      T * arrayNew = new T[size];
    00099      if (array)
    00100           ClpDisjointCopyN(array, size, arrayNew);
    00101      else
    00102           ClpFillN ( arrayNew, size, value);
    00103      return arrayNew;
    00104 }
    00105
    00107 template <class T> inline T*
    00108 ClpCopyOfArray( const T * array, const int size)
    00109 {
    00110      if (array) {
    00111           T * arrayNew = new T[size];
    00112           ClpDisjointCopyN(array, size, arrayNew);
    00113           return arrayNew;
    00114      } else {
    00115           return NULL;
    00116      }
    00117 }
    00119 typedef struct {
    00120      int typeStruct; // allocated as 1,2 etc
    00121      int typeCall;
    00122      void * data;
    00123 } ClpTrustedData;
    00124 #endif