30 void addRow(
int numberInRow,
const int *columns,
35 void addColumn(
int numberInColumn,
const int *rows,
36 const double *elements,
37 double columnLower = 0.0,
38 double columnUpper =
COIN_DBL_MAX,
double objectiveValue = 0.0);
40 inline void addCol(
int numberInColumn,
const int *rows,
41 const double *elements,
42 double columnLower = 0.0,
43 double columnUpper =
COIN_DBL_MAX,
double objectiveValue = 0.0)
45 addColumn(numberInColumn, rows, elements, columnLower, columnUpper, objectiveValue);
50 return (type_ == 0) ? numberItems_ : numberOther_;
55 return (type_ == 1) ? numberItems_ : numberOther_;
60 return numberElements_;
64 int row(
int whichRow,
double &rowLower,
double &rowUpper,
65 const int *&indices,
const double *&elements)
const;
69 int currentRow(
double &rowLower,
double &rowUpper,
70 const int *&indices,
const double *&elements)
const;
77 int column(
int whichColumn,
78 double &columnLower,
double &columnUpper,
double &objectiveValue,
79 const int *&indices,
const double *&elements)
const;
83 int currentColumn(
double &columnLower,
double &columnUpper,
double &objectiveValue,
84 const int *&indices,
const double *&elements)
const;
115 void setMutableCurrent(
int which)
const;
117 void addItem(
int numberInItem,
const int *indices,
118 const double *elements,
120 double itemUpper,
double objectiveValue);
123 int item(
int whichItem,
124 double &itemLower,
double &itemUpper,
double &objectiveValue,
125 const int *&indices,
const double *&elements)
const;
129 int currentItem(
double &itemLower,
double &itemUpper,
double &objectiveValue,
130 const int *&indices,
const double *&elements)
const;
132 void setCurrentItem(
int whichItem);
134 int currentItem()
const;
146 mutable double *currentItem_;
void setCurrentColumn(int whichColumn)
Set current column.
int type() const
Returns type.
void addRow(int numberInRow, const int *columns, const double *elements, double rowLower=-COIN_DBL_MAX, double rowUpper=COIN_DBL_MAX)
add a row
void addCol(int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0)
add a column
CoinBuild & operator=(const CoinBuild &)
=
void setCurrentRow(int whichRow)
Set current row.
void addColumn(int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0)
add a column
int currentColumn() const
Returns current column number.
int numberColumns() const
Return number of columns or maximum found so far.
int row(int whichRow, double &rowLower, double &rowUpper, const int *&indices, const double *&elements) const
Returns number of elements in a row and information in row.
int column(int whichColumn, double &columnLower, double &columnUpper, double &objectiveValue, const int *&indices, const double *&elements) const
Returns number of elements in a column and information in column.
CoinBigIndex numberElements() const
Return number of elements.
int currentRow() const
Returns current row number.
const double COIN_DBL_MAX
int numberRows() const
Return number of rows or maximum found so far.
CoinBuild()
Default constructor.
In many cases it is natural to build a model by adding one row at a time.