CoinUtils
2.9.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CoinUtils
src
CoinBuild.hpp
Go to the documentation of this file.
1
/* $Id: CoinBuild.hpp 1416 2011-04-17 09:57:29Z stefan $ */
2
// Copyright (C) 2005, 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 CoinBuild_H
7
#define CoinBuild_H
8
9
10
#include "
CoinPragma.hpp
"
11
#include "
CoinTypes.hpp
"
12
#include "
CoinFinite.hpp
"
13
14
27
class
CoinBuild
{
28
29
public
:
32
void
addRow
(
int
numberInRow,
const
int
* columns,
34
const
double
* elements,
double
rowLower=-
COIN_DBL_MAX
,
35
double
rowUpper=
COIN_DBL_MAX
);
37
void
addColumn
(
int
numberInColumn,
const
int
* rows,
38
const
double
* elements,
39
double
columnLower=0.0,
40
double
columnUpper=
COIN_DBL_MAX
,
double
objectiveValue=0.0);
42
inline
void
addCol
(
int
numberInColumn,
const
int
* rows,
43
const
double
* elements,
44
double
columnLower=0.0,
45
double
columnUpper=
COIN_DBL_MAX
,
double
objectiveValue=0.0)
46
{
addColumn
(numberInColumn, rows, elements, columnLower, columnUpper, objectiveValue);}
48
inline
int
numberRows
()
const
49
{
return
(
type_
==0) ?
numberItems_
:
numberOther_
;}
51
inline
int
numberColumns
()
const
52
{
return
(
type_
==1) ?
numberItems_
:
numberOther_
;}
54
inline
CoinBigIndex
numberElements
()
const
55
{
return
numberElements_
;}
58
int
row
(
int
whichRow,
double
& rowLower,
double
& rowUpper,
59
const
int
* & indices,
const
double
* & elements)
const
;
63
int
currentRow
(
double
& rowLower,
double
& rowUpper,
64
const
int
* & indices,
const
double
* & elements)
const
;
66
void
setCurrentRow
(
int
whichRow);
68
int
currentRow
()
const
;
71
int
column
(
int
whichColumn,
72
double
& columnLower,
double
& columnUpper,
double
& objectiveValue,
73
const
int
* & indices,
const
double
* & elements)
const
;
77
int
currentColumn
(
double
& columnLower,
double
& columnUpper,
double
& objectiveValue,
78
const
int
* & indices,
const
double
* & elements)
const
;
80
void
setCurrentColumn
(
int
whichColumn);
82
int
currentColumn
()
const
;
84
inline
int
type
()
const
85
{
return
type_
;}
87
88
92
CoinBuild
();
94
CoinBuild
(
int
type
);
96
~CoinBuild
();
98
102
CoinBuild
(
const
CoinBuild
&);
104
CoinBuild
&
operator=
(
const
CoinBuild
&);
106
private
:
108
void
setMutableCurrent
(
int
which)
const
;
110
void
addItem
(
int
numberInItem,
const
int
* indices,
111
const
double
* elements,
112
double
itemLower,
113
double
itemUpper,
double
objectiveValue);
116
int
item
(
int
whichItem,
117
double
& itemLower,
double
& itemUpper,
double
& objectiveValue,
118
const
int
* & indices,
const
double
* & elements)
const
;
122
int
currentItem
(
double
& itemLower,
double
& itemUpper,
double
& objectiveValue,
123
const
int
* & indices,
const
double
* & elements)
const
;
125
void
setCurrentItem
(
int
whichItem);
127
int
currentItem
()
const
;
128
129
private
:
132
int
numberItems_
;
135
int
numberOther_
;
137
CoinBigIndex
numberElements_
;
139
mutable
double
*
currentItem_
;
141
double
*
firstItem_
;
143
double
*
lastItem_
;
145
int
type_
;
147
};
148
149
#endif
Generated by
1.8.4