Skip to content

Commit

Permalink
Revert "merge r2521 from trunk, but make synchronizeMatrix() private;…
Browse files Browse the repository at this point in the history
… see #113"

This reverts commit 2ec5321.
  • Loading branch information
Mizux committed Sep 29, 2021
1 parent 71ea53d commit 64ef8dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
19 changes: 0 additions & 19 deletions Clp/src/ClpModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,15 +1385,6 @@ void ClpModel::resize(int newNumberRows, int newNumberColumns)
maximumColumns_ = CoinMax(maximumColumns_, numberColumns_);
}
}
// Makes sure matrix dimensions are at least model dimensions
void ClpModel::synchronizeMatrix()
{
if (matrix_) {
int numberRows = CoinMax(numberRows_,matrix_->getNumRows());
int numberColumns = CoinMax(numberColumns_,matrix_->getNumCols());
matrix_->setDimensions(numberRows,numberColumns);
}
}
// Deletes rows
void ClpModel::deleteRows(int number, const int *which)
{
Expand Down Expand Up @@ -1820,7 +1811,6 @@ void ClpModel::addRows(int number, const double *rowLower,
matrix_->appendMatrix(number, 0, rowStarts, columns, elements);
}
}
synchronizeMatrix();
}
// Add rows
void ClpModel::addRows(int number, const double *rowLower,
Expand Down Expand Up @@ -1853,7 +1843,6 @@ void ClpModel::addRows(int number, const double *rowLower,
delete[] newIndex;
delete[] newElements;
}
synchronizeMatrix();
}
#ifndef CLP_NO_VECTOR
void ClpModel::addRows(int number, const double *rowLower,
Expand Down Expand Up @@ -1907,7 +1896,6 @@ void ClpModel::addRows(int number, const double *rowLower,
if (lengthNames_) {
rowNames_.resize(numberRows_);
}
synchronizeMatrix();
}
#endif
#ifndef SLIM_CLP
Expand Down Expand Up @@ -2085,7 +2073,6 @@ int ClpModel::addRows(const CoinBuild &buildObject, bool tryPlusMinusOne, bool c
// make sure matrix correct size
matrix_->setDimensions(numberRows_, numberColumns_);
}
synchronizeMatrix();
return numberErrors;
}
#endif
Expand Down Expand Up @@ -2208,7 +2195,6 @@ int ClpModel::addRows(CoinModel &modelObject, bool tryPlusMinusOne, bool checkDu
<< numberErrors
<< CoinMessageEol;
}
synchronizeMatrix();
return numberErrors;
} else {
// not suitable for addRows
Expand Down Expand Up @@ -2300,7 +2286,6 @@ void ClpModel::addColumns(int number, const double *columnLower,
// Do even if elements NULL (to resize)
matrix_->appendMatrix(number, 1, columnStarts, rows, elements);
}
synchronizeMatrix();
}
// Add columns
void ClpModel::addColumns(int number, const double *columnLower,
Expand Down Expand Up @@ -2334,7 +2319,6 @@ void ClpModel::addColumns(int number, const double *columnLower,
delete[] newIndex;
delete[] newElements;
}
synchronizeMatrix();
}
#ifndef CLP_NO_VECTOR
void ClpModel::addColumns(int number, const double *columnLower,
Expand Down Expand Up @@ -2399,7 +2383,6 @@ void ClpModel::addColumns(int number, const double *columnLower,
if (lengthNames_) {
columnNames_.resize(numberColumns_);
}
synchronizeMatrix();
}
#endif
#ifndef SLIM_CLP
Expand Down Expand Up @@ -2534,7 +2517,6 @@ int ClpModel::addColumns(const CoinBuild &buildObject, bool tryPlusMinusOne, boo
delete[] lower;
delete[] upper;
}
synchronizeMatrix();
return 0;
}
#endif
Expand Down Expand Up @@ -2650,7 +2632,6 @@ int ClpModel::addColumns(CoinModel &modelObject, bool tryPlusMinusOne, bool chec
<< numberErrors
<< CoinMessageEol;
}
synchronizeMatrix();
return numberErrors;
} else {
// not suitable for addColumns
Expand Down
4 changes: 0 additions & 4 deletions Clp/src/ClpModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ class ClpModel {
bool isInteger(int index) const;
/// Resizes rim part of model
void resize(int newNumberRows, int newNumberColumns);
private:
/// Makes sure matrix dimensions are at least model dimensions
void synchronizeMatrix();
public:
/// Deletes rows
void deleteRows(int number, const int *which);
/// Add one row
Expand Down

0 comments on commit 64ef8dc

Please sign in to comment.