Main Page
Classes
Files
File List
File Members
opt
build
clp
clp-1.12.0
Clp
src
ClpParameters.hpp
Go to the documentation of this file.
1
/* $Id: ClpParameters.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2
// Copyright (C) 2000, 2002, International Business Machines
3
// Corporation and others. All Rights Reserved.
4
5
#ifndef _ClpParameters_H
6
#define _ClpParameters_H
7
11
enum
ClpIntParam
{
14
ClpMaxNumIteration
= 0,
17
ClpMaxNumIterationHotStart
,
36
ClpNameDiscipline
,
39
ClpLastIntParam
40
};
41
42
enum
ClpDblParam
{
46
ClpDualObjectiveLimit
,
50
ClpPrimalObjectiveLimit
,
53
ClpDualTolerance
,
56
ClpPrimalTolerance
,
59
ClpObjOffset
,
61
ClpMaxSeconds
,
63
ClpPresolveTolerance
,
66
ClpLastDblParam
67
};
68
69
70
enum
ClpStrParam
{
73
ClpProbName
= 0,
76
ClpLastStrParam
77
};
78
80
template
<
class
T>
inline
void
81
ClpDisjointCopyN
(
const
T * array,
const
int
size, T * newArray)
82
{
83
memcpy(reinterpret_cast<void *> (newArray), array, size *
sizeof
(T));
84
}
86
template
<
class
T>
inline
void
87
ClpFillN
( T * array,
const
int
size, T value)
88
{
89
int
i;
90
for
(i = 0; i < size; i++)
91
array[i] = value;
92
}
94
template
<
class
T>
inline
T*
95
ClpCopyOfArray
(
const
T * array,
const
int
size, T value)
96
{
97
T * arrayNew =
new
T[size];
98
if
(array)
99
ClpDisjointCopyN
(array, size, arrayNew);
100
else
101
ClpFillN
( arrayNew, size, value);
102
return
arrayNew;
103
}
104
106
template
<
class
T>
inline
T*
107
ClpCopyOfArray
(
const
T * array,
const
int
size)
108
{
109
if
(array) {
110
T * arrayNew =
new
T[size];
111
ClpDisjointCopyN
(array, size, arrayNew);
112
return
arrayNew;
113
}
else
{
114
return
NULL;
115
}
116
}
118
typedef
struct
{
119
int
typeStruct
;
// allocated as 1,2 etc
120
int
typeCall
;
121
void
*
data
;
122
}
ClpTrustedData
;
123
#endif
Generated on Tue Mar 1 2016 22:38:52 by
1.8.4