Clp 1.17.5
Loading...
Searching...
No Matches
ClpParameters.hpp
Go to the documentation of this file.
1/* $Id: ClpParameters.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2// Copyright (C) 2000, 2002, International Business Machines
3// Corporation and others. All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
6#ifndef _ClpParameters_H
7#define _ClpParameters_H
8
42
71
80
82template < class T >
83inline void
84ClpDisjointCopyN(const T *array, const CoinBigIndex size, T *newArray)
85{
86 memcpy(reinterpret_cast< void * >(newArray), array, size * sizeof(T));
87}
89template < class T >
90inline void
91ClpFillN(T *array, const CoinBigIndex size, T value)
92{
93 CoinBigIndex i;
94 for (i = 0; i < size; i++)
95 array[i] = value;
96}
98template < class T >
99inline T *
100ClpCopyOfArray(const T *array, const CoinBigIndex size, T value)
101{
102 T *arrayNew = new T[size];
103 if (array)
104 ClpDisjointCopyN(array, size, arrayNew);
105 else
106 ClpFillN(arrayNew, size, value);
107 return arrayNew;
108}
109
111template < class T >
112inline T *
113ClpCopyOfArray(const T *array, const CoinBigIndex size)
114{
115 if (array) {
116 T *arrayNew = new T[size];
117 ClpDisjointCopyN(array, size, arrayNew);
118 return arrayNew;
119 } else {
120 return NULL;
121 }
122}
124typedef struct {
125 int typeStruct; // allocated as 1,2 etc
127 void *data;
129#endif
130
131/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
132*/
void ClpFillN(T *array, const CoinBigIndex size, T value)
And set.
T * ClpCopyOfArray(const T *array, const CoinBigIndex size, T value)
This returns a non const array filled with input from scalar or actual array.
ClpIntParam
This is where to put any useful stuff.
@ ClpMaxNumIterationHotStart
The maximum number of iterations Clp can execute in hotstart before terminating.
@ ClpNameDiscipline
The name discipline; specifies how the solver will handle row and column names.
@ ClpMaxNumIteration
The maximum number of iterations Clp can execute in the simplex methods.
@ ClpLastIntParam
Just a marker, so that we can allocate a static sized array to store parameters.
ClpStrParam
@ ClpLastStrParam
Just a marker, so that we can allocate a static sized array to store parameters.
@ ClpProbName
Name of the problem.
ClpDblParam
@ ClpPresolveTolerance
Tolerance to use in presolve.
@ ClpDualTolerance
The maximum amount the dual constraints can be violated and still be considered feasible.
@ ClpPrimalObjectiveLimit
Primal objective limit.
@ ClpMaxSeconds
Maximum time in seconds - after, this action is as max iterations.
@ ClpDualObjectiveLimit
Set Dual objective limit.
@ ClpLastDblParam
Just a marker, so that we can allocate a static sized array to store parameters.
@ ClpPrimalTolerance
The maximum amount the primal constraints can be violated and still be considered feasible.
@ ClpObjOffset
Objective function constant.
@ ClpMaxWallSeconds
Maximum wallclock running time in seconds - after, this action is as max iterations.
void ClpDisjointCopyN(const T *array, const CoinBigIndex size, T *newArray)
Copy (I don't like complexity of Coin version)
For a structure to be used by trusted code.