Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (4 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpParameters.hpp

    r2271 r2385  
    1111*/
    1212enum ClpIntParam {
    13      /** The maximum number of iterations Clp can execute in the simplex methods
     13  /** The maximum number of iterations Clp can execute in the simplex methods
    1414      */
    15      ClpMaxNumIteration = 0,
    16      /** The maximum number of iterations Clp can execute in hotstart before
     15  ClpMaxNumIteration = 0,
     16  /** The maximum number of iterations Clp can execute in hotstart before
    1717         terminating */
    18      ClpMaxNumIterationHotStart,
    19      /** The name discipline; specifies how the solver will handle row and
     18  ClpMaxNumIterationHotStart,
     19  /** The name discipline; specifies how the solver will handle row and
    2020         column names.
    2121       - 0: Auto names: Names cannot be set by the client. Names of the form
     
    3535        contain either the name specified by the client or a generated name.
    3636     */
    37      ClpNameDiscipline,
    38      /** Just a marker, so that we can allocate a static sized array to store
     37  ClpNameDiscipline,
     38  /** Just a marker, so that we can allocate a static sized array to store
    3939         parameters. */
    40      ClpLastIntParam
     40  ClpLastIntParam
    4141};
    4242
    4343enum ClpDblParam {
    44      /** Set Dual objective limit. This is to be used as a termination criteria
     44  /** Set Dual objective limit. This is to be used as a termination criteria
    4545         in methods where the dual objective monotonically changes (dual
    4646         simplex). */
    47      ClpDualObjectiveLimit,
    48      /** Primal objective limit. This is to be used as a termination
     47  ClpDualObjectiveLimit,
     48  /** Primal objective limit. This is to be used as a termination
    4949         criteria in methods where the primal objective monotonically changes
    5050         (e.g., primal simplex) */
    51      ClpPrimalObjectiveLimit,
    52      /** The maximum amount the dual constraints can be violated and still be
     51  ClpPrimalObjectiveLimit,
     52  /** The maximum amount the dual constraints can be violated and still be
    5353         considered feasible. */
    54      ClpDualTolerance,
    55      /** The maximum amount the primal constraints can be violated and still be
     54  ClpDualTolerance,
     55  /** The maximum amount the primal constraints can be violated and still be
    5656         considered feasible. */
    57      ClpPrimalTolerance,
    58      /** Objective function constant. This the value of the constant term in
     57  ClpPrimalTolerance,
     58  /** Objective function constant. This the value of the constant term in
    5959         the objective function. */
    60      ClpObjOffset,
    61      /// Maximum time in seconds - after, this action is as max iterations
    62      ClpMaxSeconds,
    63      /// Maximum wallclock running time in seconds - after, this action is as max iterations
    64      ClpMaxWallSeconds,
    65      /// Tolerance to use in presolve
    66      ClpPresolveTolerance,
    67      /** Just a marker, so that we can allocate a static sized array to store
     60  ClpObjOffset,
     61  /// Maximum time in seconds - after, this action is as max iterations
     62  ClpMaxSeconds,
     63  /// Maximum wallclock running time in seconds - after, this action is as max iterations
     64  ClpMaxWallSeconds,
     65  /// Tolerance to use in presolve
     66  ClpPresolveTolerance,
     67  /** Just a marker, so that we can allocate a static sized array to store
    6868         parameters. */
    69      ClpLastDblParam
     69  ClpLastDblParam
    7070};
    7171
    72 
    7372enum ClpStrParam {
    74      /** Name of the problem. This is the found on the Name card of
     73  /** Name of the problem. This is the found on the Name card of
    7574         an mps file. */
    76      ClpProbName = 0,
    77      /** Just a marker, so that we can allocate a static sized array to store
     75  ClpProbName = 0,
     76  /** Just a marker, so that we can allocate a static sized array to store
    7877         parameters. */
    79      ClpLastStrParam
     78  ClpLastStrParam
    8079};
    8180
    8281/// Copy (I don't like complexity of Coin version)
    83 template <class T> inline void
    84 ClpDisjointCopyN( const T * array, const CoinBigIndex size, T * newArray)
     82template < class T >
     83inline void
     84ClpDisjointCopyN(const T *array, const CoinBigIndex size, T *newArray)
    8585{
    86      memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
     86  memcpy(reinterpret_cast< void * >(newArray), array, size * sizeof(T));
    8787}
    8888/// And set
    89 template <class T> inline void
    90 ClpFillN( T * array, const CoinBigIndex size, T value)
     89template < class T >
     90inline void
     91ClpFillN(T *array, const CoinBigIndex size, T value)
    9192{
    92      CoinBigIndex i;
    93      for (i = 0; i < size; i++)
    94           array[i] = value;
     93  CoinBigIndex i;
     94  for (i = 0; i < size; i++)
     95    array[i] = value;
    9596}
    9697/// This returns a non const array filled with input from scalar or actual array
    97 template <class T> inline T*
    98 ClpCopyOfArray( const T * array, const CoinBigIndex size, T value)
     98template < class T >
     99inline T *
     100ClpCopyOfArray(const T *array, const CoinBigIndex size, T value)
    99101{
    100      T * arrayNew = new T[size];
    101      if (array)
    102           ClpDisjointCopyN(array, size, arrayNew);
    103      else
    104           ClpFillN ( arrayNew, size, value);
    105      return arrayNew;
     102  T *arrayNew = new T[size];
     103  if (array)
     104    ClpDisjointCopyN(array, size, arrayNew);
     105  else
     106    ClpFillN(arrayNew, size, value);
     107  return arrayNew;
    106108}
    107109
    108110/// This returns a non const array filled with actual array (or NULL)
    109 template <class T> inline T*
    110 ClpCopyOfArray( const T * array, const CoinBigIndex size)
     111template < class T >
     112inline T *
     113ClpCopyOfArray(const T *array, const CoinBigIndex size)
    111114{
    112      if (array) {
    113           T * arrayNew = new T[size];
    114           ClpDisjointCopyN(array, size, arrayNew);
    115           return arrayNew;
    116      } else {
    117           return NULL;
    118      }
     115  if (array) {
     116    T *arrayNew = new T[size];
     117    ClpDisjointCopyN(array, size, arrayNew);
     118    return arrayNew;
     119  } else {
     120    return NULL;
     121  }
    119122}
    120123/// For a structure to be used by trusted code
    121124typedef struct {
    122      int typeStruct; // allocated as 1,2 etc
    123      int typeCall;
    124      void * data;
     125  int typeStruct; // allocated as 1,2 etc
     126  int typeCall;
     127  void *data;
    125128} ClpTrustedData;
    126129#endif
     130
     131/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     132*/
Note: See TracChangeset for help on using the changeset viewer.