# ClpParameters.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpParameters.hpp 2046 2014-08-14 04:13:10Z tkr $ */
    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      ClpMaxWallSeconds,
    00066      ClpPresolveTolerance,
    00069      ClpLastDblParam
    00070 };
    00071
    00072
    00073 enum ClpStrParam {
    00076      ClpProbName = 0,
    00079      ClpLastStrParam
    00080 };
    00081
    00083 template <class T> inline void
    00084 ClpDisjointCopyN( const T * array, const int size, T * newArray)
    00085 {
    00086      memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
    00087 }
    00089 template <class T> inline void
    00090 ClpFillN( T * array, const int size, T value)
    00091 {
    00092      int i;
    00093      for (i = 0; i < size; i++)
    00094           array[i] = value;
    00095 }
    00097 template <class T> inline T*
    00098 ClpCopyOfArray( const T * array, const int size, T value)
    00099 {
    00100      T * arrayNew = new T[size];
    00101      if (array)
    00102           ClpDisjointCopyN(array, size, arrayNew);
    00103      else
    00104           ClpFillN ( arrayNew, size, value);
    00105      return arrayNew;
    00106 }
    00107
    00109 template <class T> inline T*
    00110 ClpCopyOfArray( const T * array, const int size)
    00111 {
    00112      if (array) {
    00113           T * arrayNew = new T[size];
    00114           ClpDisjointCopyN(array, size, arrayNew);
    00115           return arrayNew;
    00116      } else {
    00117           return NULL;
    00118      }
    00119 }
    00121 typedef struct {
    00122      int typeStruct; // allocated as 1,2 etc
    00123      int typeCall;
    00124      void * data;
    00125 } ClpTrustedData;
    00126 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines