Loading...
Searching...
No Matches
ClpPlusMinusOneMatrix.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2003, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpPlusMinusOneMatrix_H
#define ClpPlusMinusOneMatrix_H
#include "CoinPragma.hpp"
#include "ClpMatrixBase.hpp"
class ClpPlusMinusOneMatrix : public ClpMatrixBase {
public:
virtual CoinPackedMatrix *getPackedMatrix() const;
virtual bool isColOrdered() const;
virtual CoinBigIndex getNumElements() const;
virtual int getNumCols() const
{
return numberColumns_;
}
virtual int getNumRows() const
{
return numberRows_;
}
virtual const double *getElements() const;
virtual const int *getIndices() const
{
return indices_;
}
// and for advanced use
int *getMutableIndices() const
{
return indices_;
}
virtual const CoinBigIndex *getVectorStarts() const;
virtual const int *getVectorLengths() const;
virtual void deleteCols(const int numDel, const int *indDel);
virtual void deleteRows(const int numDel, const int *indDel);
virtual void appendCols(int number, const CoinPackedVectorBase *const *columns);
virtual void appendRows(int number, const CoinPackedVectorBase *const *rows);
#ifndef SLIM_CLP
virtual int appendMatrix(int number, int type,
const CoinBigIndex *starts, const int *index,
const double *element, int numberOther = -1);
#endif
virtual ClpMatrixBase *reverseOrderedCopy() const;
virtual int countBasis(
const int *whichColumn,
int &numberColumnBasic);
virtual void fillBasis(ClpSimplex *model,
const int *whichColumn,
int &numberColumnBasic,
int *row, int *start,
int *rowCount, int *columnCount,
CoinFactorizationDouble *element);
virtual CoinBigIndex *dubiousWeights(const ClpSimplex *model, int *inputWeights) const;
virtual void rangeOfElements(double &smallestNegative, double &largestNegative,
double &smallestPositive, double &largestPositive);
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column) const;
virtual void unpackPacked(ClpSimplex *model,
CoinIndexedVector *rowArray,
int column) const;
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column, double multiplier) const;
virtual void add(const ClpSimplex *model, double *array,
int column, double multiplier) const;
virtual void releasePackedMatrix() const;
virtual void setDimensions(int numrows, int numcols);
void checkValid(bool detail) const;
virtual void times(double scalar,
const double *x, double *y) const;
virtual void times(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale) const;
virtual void transposeTimes(double scalar,
const double *x, double *y) const;
virtual void transposeTimes(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale, double *spare = NULL) const;
virtual void transposeTimes(const ClpSimplex *model, double scalar,
const CoinIndexedVector *x,
CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual void transposeTimesByRow(const ClpSimplex *model, double scalar,
const CoinIndexedVector *x,
CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual void subsetTransposeTimes(const ClpSimplex *model,
const CoinIndexedVector *x,
const CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual bool canCombine(const ClpSimplex *model,
const CoinIndexedVector *pi) const;
virtual int transposeTimes2(const ClpSimplex *model,
const CoinIndexedVector *pi1, CoinIndexedVector *dj1,
const CoinIndexedVector *pi2,
CoinIndexedVector *spare,
double *infeas, double *reducedCost,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor);
virtual void subsetTimes2(const ClpSimplex *model,
CoinIndexedVector *dj1,
const CoinIndexedVector *pi2, CoinIndexedVector *dj2,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor);
inline CoinBigIndex *startPositive() const
{
return startPositive_;
}
inline CoinBigIndex *startNegative() const
{
return startNegative_;
}
ClpPlusMinusOneMatrix();
virtual ~ClpPlusMinusOneMatrix();
ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &);
ClpPlusMinusOneMatrix(const CoinPackedMatrix &);
ClpPlusMinusOneMatrix(int numberRows, int numberColumns,
bool columnOrdered, const int *indices,
const CoinBigIndex *startPositive, const CoinBigIndex *startNegative);
ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &wholeModel,
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns);
ClpPlusMinusOneMatrix &operator=(const ClpPlusMinusOneMatrix &);
virtual ClpMatrixBase *clone() const;
virtual ClpMatrixBase *subsetClone(
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns) const;
void passInCopy(int numberRows, int numberColumns,
bool columnOrdered, int *indices,
CoinBigIndex *startPositive, CoinBigIndex *startNegative);
virtual bool canDoPartialPricing() const;
virtual void partialPricing(ClpSimplex *model, double start, double end,
int &bestSequence, int &numberWanted);
protected:
mutable CoinPackedMatrix *matrix_;
mutable int *lengths_;
CoinBigIndex *COIN_RESTRICT startPositive_;
CoinBigIndex *COIN_RESTRICT startNegative_;
int *COIN_RESTRICT indices_;
int numberRows_;
int numberColumns_;
#ifdef CLP_PLUS_ONE_MATRIX
mutable int otherFlags_;
#endif
bool columnOrdered_;
};
#if CLP_POOL_MATRIX
#define CLP_POOL_SIZE 32 - CLP_POOL_MATRIX
#if CLP_POOL_MATRIX == 16
typedef struct {
unsigned short row_;
unsigned short pool_;
} poolInfo;
#else
typedef struct {
unsigned int row_ : CLP_POOL_MATRIX;
unsigned short pool_ : CLP_POOL_SIZE;
} poolInfo;
#endif
#include "ClpPackedMatrix.hpp"
class ClpPoolMatrix : public ClpMatrixBase {
public:
virtual CoinPackedMatrix *getPackedMatrix() const;
virtual bool isColOrdered() const;
virtual CoinBigIndex getNumElements() const;
inline int getNumDifferentElements() const
{
return numberDifferent_;
}
virtual int getNumCols() const
{
return numberColumns_;
}
virtual int getNumRows() const
{
return numberRows_;
}
virtual const double *getElements() const;
virtual const int *getIndices() const;
// and for advanced use
int *getMutableIndices() const;
virtual const CoinBigIndex *getVectorStarts() const;
virtual const int *getVectorLengths() const;
virtual int getVectorLength(int index) const;
virtual void deleteCols(const int numDel, const int *indDel);
virtual void deleteRows(const int numDel, const int *indDel);
virtual ClpMatrixBase *reverseOrderedCopy() const;
virtual int countBasis(
const int *whichColumn,
int &numberColumnBasic);
virtual void fillBasis(ClpSimplex *model,
const int *whichColumn,
int &numberColumnBasic,
int *row, int *start,
int *rowCount, int *columnCount,
CoinFactorizationDouble *element);
virtual void rangeOfElements(double &smallestNegative, double &largestNegative,
double &smallestPositive, double &largestPositive);
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column) const;
virtual void unpackPacked(ClpSimplex *model,
CoinIndexedVector *rowArray,
int column) const;
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column, double multiplier) const;
virtual void add(const ClpSimplex *model, double *array,
int column, double multiplier) const;
virtual void releasePackedMatrix() const;
virtual void setDimensions(int numrows, int numcols);
void checkValid(bool detail) const;
virtual void times(double scalar,
const double *x, double *y) const;
virtual void times(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale) const;
virtual void transposeTimes(double scalar,
const double *x, double *y) const;
virtual void transposeTimes(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale, double *spare = NULL) const;
virtual void transposeTimes(const ClpSimplex *model, double scalar,
const CoinIndexedVector *x,
CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual void transposeTimesByRow(const ClpSimplex *model, double scalar,
const CoinIndexedVector *x,
CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual void subsetTransposeTimes(const ClpSimplex *model,
const CoinIndexedVector *x,
const CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual bool canCombine(const ClpSimplex *model,
const CoinIndexedVector *pi) const
{
return true;
}
virtual int transposeTimes2(const ClpSimplex *model,
const CoinIndexedVector *pi1, CoinIndexedVector *dj1,
const CoinIndexedVector *pi2,
CoinIndexedVector *spare,
double *infeas, double *reducedCost,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor);
virtual void subsetTimes2(const ClpSimplex *model,
CoinIndexedVector *dj1,
const CoinIndexedVector *pi2, CoinIndexedVector *dj2,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor);
inline CoinBigIndex *columnStart() const
{
return columnStart_;
}
ClpPoolMatrix();
virtual ~ClpPoolMatrix();
ClpPoolMatrix(const ClpPoolMatrix &);
ClpPoolMatrix(const CoinPackedMatrix &);
ClpPoolMatrix(int numberRows, int numberColumns,
const int *indices, const double *elements,
const CoinBigIndex *columnStart);
ClpPoolMatrix(int numberColumns, CoinBigIndex *columnStart,
poolInfo *stuff, double *elements);
ClpPoolMatrix(const ClpPoolMatrix &wholeModel,
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns);
ClpPoolMatrix &operator=(const ClpPoolMatrix &);
virtual ClpMatrixBase *clone() const;
virtual ClpMatrixBase *subsetClone(
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns) const;
virtual bool canDoPartialPricing() const;
virtual void partialPricing(ClpSimplex *model, double start, double end,
int &bestSequence, int &numberWanted);
protected:
ClpPackedMatrix *createMatrix() const;
mutable ClpPackedMatrix *matrix_;
mutable int *lengths_;
double *COIN_RESTRICT elements_;
CoinBigIndex *COIN_RESTRICT columnStart_;
poolInfo *COIN_RESTRICT stuff_;
int numberRows_;
int numberColumns_;
int numberDifferent_;
};
#endif
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
operator=
CbcOrClpParam & operator=(const CbcOrClpParam &rhs)
Assignment operator. This copies the data.
ClpMatrixBase.hpp
COIN_RESTRICT
#define COIN_RESTRICT
Definition ClpMatrixBase.hpp:21
ClpPackedMatrix.hpp
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition ClpMatrixBase.hpp:38
ClpMatrixBase::unpackPacked
virtual void unpackPacked(ClpSimplex *model, CoinIndexedVector *rowArray, int column) const =0
Unpacks a column into an CoinIndexedvector in packed format Note that model is NOT const.
ClpMatrixBase::isColOrdered
virtual bool isColOrdered() const =0
Whether the packed matrix is column major ordered or not.
ClpMatrixBase::getIndices
virtual const int * getIndices() const =0
A vector containing the minor indices of the elements in the packed matrix.
ClpMatrixBase::setDimensions
virtual void setDimensions(int numrows, int numcols)
Set the dimensions of the matrix.
ClpMatrixBase::releasePackedMatrix
virtual void releasePackedMatrix() const =0
Allow any parts of a created CoinPackedMatrix to be deleted.
ClpMatrixBase::getVectorLengths
virtual const int * getVectorLengths() const =0
The lengths of the major-dimension vectors.
ClpMatrixBase::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps Is allowed to return NULL if doesn't want to have ...
Definition ClpMatrixBase.hpp:96
ClpMatrixBase::add
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const =0
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
ClpMatrixBase::getNumCols
virtual int getNumCols() const =0
Number of columns.
ClpMatrixBase::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const =0
Unpacks a column into an CoinIndexedvector.
ClpMatrixBase::getNumRows
virtual int getNumRows() const =0
Number of rows.
ClpMatrixBase::reducedCost
double reducedCost(ClpSimplex *model, int sequence) const
Returns reduced cost of a variable.
ClpMatrixBase::ClpMatrixBase
ClpMatrixBase()
Default constructor.
ClpMatrixBase::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const =0
Return a complete CoinPackedMatrix.
ClpMatrixBase::transposeTimes
virtual void transposeTimes(double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
Return y + x * scalar * A in y.
ClpMatrixBase::subsetTimes2
virtual void subsetTimes2(const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates second array for steepest and does devex weights (need not be coded).
ClpMatrixBase::type
int type() const
Returns type.
Definition ClpMatrixBase.hpp:383
ClpMatrixBase::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const =0
ClpMatrixBase::countBasis
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)=0
Returns number of elements in column part of basis.
ClpMatrixBase::fillBasis
virtual void fillBasis(ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)=0
Fills in column part of basis.
ClpMatrixBase::transposeTimes2
virtual int transposeTimes2(const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *spare, double *infeas, double *reducedCost, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates two arrays for steepest and does devex weights (need not be coded) Returns nonzero if updates...
ClpMatrixBase::getElements
virtual const double * getElements() const =0
A vector containing the elements in the packed matrix.
ClpMatrixBase::rangeOfElements
virtual void rangeOfElements(double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
Returns largest and smallest elements of both signs.
ClpMatrixBase::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)=0
Delete the rows whose indices are listed in indDel.
ClpMatrixBase::times
virtual void times(double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
Return y + A * x * scalar in y.
ClpMatrixBase::canCombine
virtual bool canCombine(const ClpSimplex *, const CoinIndexedVector *) const
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster.
Definition ClpMatrixBase.hpp:328
ClpMatrixBase::getNumElements
virtual CoinBigIndex getNumElements() const =0
Number of entries in the packed matrix.
ClpMatrixBase::getVectorLength
virtual int getVectorLength(int index) const
The length of a single major-dimension vector.
ClpMatrixBase::subsetTransposeTimes
virtual void subsetTransposeTimes(const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const =0
Return x *A in z but just for indices in y.
ClpMatrixBase::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)=0
Delete the columns whose indices are listed in indDel.
ClpPlusMinusOneMatrix::add
virtual void add(const ClpSimplex *model, double *array, int column, double multiplier) const
Adds multiple of a column into an array.
ClpPlusMinusOneMatrix::subsetTransposeTimes
virtual void subsetTransposeTimes(const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const
Return x *A in z but just for indices in y.
ClpPlusMinusOneMatrix::lengths_
int * lengths_
Definition ClpPlusMinusOneMatrix.hpp:273
ClpPlusMinusOneMatrix::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const
ClpPlusMinusOneMatrix::canDoPartialPricing
virtual bool canDoPartialPricing() const
Says whether it can do partial pricing.
ClpPlusMinusOneMatrix::getNumCols
virtual int getNumCols() const
Number of columns.
Definition ClpPlusMinusOneMatrix.hpp:29
ClpPlusMinusOneMatrix::getIndices
virtual const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition ClpPlusMinusOneMatrix.hpp:49
ClpPlusMinusOneMatrix::getVectorLengths
virtual const int * getVectorLengths() const
The lengths of the major-dimension vectors.
ClpPlusMinusOneMatrix::times
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
ClpPlusMinusOneMatrix::setDimensions
virtual void setDimensions(int numrows, int numcols)
Set the dimensions of the matrix.
ClpPlusMinusOneMatrix::getMutableIndices
int * getMutableIndices() const
Definition ClpPlusMinusOneMatrix.hpp:54
ClpPlusMinusOneMatrix::getElements
virtual const double * getElements() const
A vector containing the elements in the packed matrix.
ClpPlusMinusOneMatrix::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)
Delete the columns whose indices are listed in indDel.
ClpPlusMinusOneMatrix::countBasis
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
ClpPlusMinusOneMatrix::subsetTimes2
virtual void subsetTimes2(const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates second array for steepest and does devex weights.
ClpPlusMinusOneMatrix::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)
Delete the rows whose indices are listed in indDel.
ClpPlusMinusOneMatrix::numberRows_
int numberRows_
Number of rows.
Definition ClpPlusMinusOneMatrix.hpp:281
ClpPlusMinusOneMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
ClpPlusMinusOneMatrix::indices_
int *COIN_RESTRICT indices_
Data -1, then +1 rows in pairs (row==-1 if one entry).
Definition ClpPlusMinusOneMatrix.hpp:279
ClpPlusMinusOneMatrix::partialPricing
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
ClpPlusMinusOneMatrix::unpackPacked
virtual void unpackPacked(ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const.
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &)
The copy constructor.
ClpPlusMinusOneMatrix::matrix_
CoinPackedMatrix * matrix_
For fake CoinPackedMatrix.
Definition ClpPlusMinusOneMatrix.hpp:272
ClpPlusMinusOneMatrix::passInCopy
void passInCopy(int numberRows, int numberColumns, bool columnOrdered, int *indices, CoinBigIndex *startPositive, CoinBigIndex *startNegative)
pass in copy (object takes ownership)
ClpPlusMinusOneMatrix::rangeOfElements
virtual void rangeOfElements(double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
Returns largest and smallest elements of both signs.
ClpPlusMinusOneMatrix::numberColumns_
int numberColumns_
Number of columns.
Definition ClpPlusMinusOneMatrix.hpp:283
ClpPlusMinusOneMatrix::operator=
ClpPlusMinusOneMatrix & operator=(const ClpPlusMinusOneMatrix &)
ClpPlusMinusOneMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y, const double *rowScale, const double *columnScale, double *spare=NULL) const
And for scaling.
ClpPlusMinusOneMatrix::startNegative
CoinBigIndex * startNegative() const
Return starts of -1s.
Definition ClpPlusMinusOneMatrix.hpp:213
ClpPlusMinusOneMatrix::columnOrdered_
bool columnOrdered_
True if column ordered.
Definition ClpPlusMinusOneMatrix.hpp:291
ClpPlusMinusOneMatrix::appendCols
virtual void appendCols(int number, const CoinPackedVectorBase *const *columns)
Append Columns.
ClpPlusMinusOneMatrix::appendRows
virtual void appendRows(int number, const CoinPackedVectorBase *const *rows)
Append Rows.
ClpPlusMinusOneMatrix::checkValid
void checkValid(bool detail) const
Just checks matrix valid - will say if dimensions not quite right if detail.
ClpPlusMinusOneMatrix::startNegative_
CoinBigIndex *COIN_RESTRICT startNegative_
Start of -1's for each.
Definition ClpPlusMinusOneMatrix.hpp:277
ClpPlusMinusOneMatrix::fillBasis
virtual void fillBasis(ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)
Fills in column part of basis.
ClpPlusMinusOneMatrix::startPositive_
CoinBigIndex *COIN_RESTRICT startPositive_
Start of +1's for each.
Definition ClpPlusMinusOneMatrix.hpp:275
ClpPlusMinusOneMatrix::releasePackedMatrix
virtual void releasePackedMatrix() const
Allow any parts of a created CoinMatrix to be deleted.
ClpPlusMinusOneMatrix::canCombine
virtual bool canCombine(const ClpSimplex *model, const CoinIndexedVector *pi) const
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster.
ClpPlusMinusOneMatrix::transposeTimes
virtual void transposeTimes(const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
Return x * scalar * A + y in z.
ClpPlusMinusOneMatrix::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
ClpPlusMinusOneMatrix::~ClpPlusMinusOneMatrix
virtual ~ClpPlusMinusOneMatrix()
Destructor.
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix(const CoinPackedMatrix &)
The copy constructor from an CoinPlusMinusOneMatrix.
ClpPlusMinusOneMatrix::dubiousWeights
virtual CoinBigIndex * dubiousWeights(const ClpSimplex *model, int *inputWeights) const
Given positive integer weights for each row fills in sum of weights for each column (and slack).
ClpPlusMinusOneMatrix::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector.
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix()
Default constructor.
ClpPlusMinusOneMatrix::appendMatrix
virtual int appendMatrix(int number, int type, const CoinBigIndex *starts, const int *index, const double *element, int numberOther=-1)
Append a set of rows/columns to the end of the matrix.
ClpPlusMinusOneMatrix::transposeTimes2
virtual int transposeTimes2(const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *spare, double *infeas, double *reducedCost, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates two arrays for steepest and does devex weights Returns nonzero if updates reduced cost and in...
ClpPlusMinusOneMatrix::getNumRows
virtual int getNumRows() const
Number of rows.
Definition ClpPlusMinusOneMatrix.hpp:34
ClpPlusMinusOneMatrix::add
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
ClpPlusMinusOneMatrix::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
ClpPlusMinusOneMatrix::transposeTimesByRow
virtual void transposeTimesByRow(const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
Return x * scalar * A + y in z.
ClpPlusMinusOneMatrix::times
virtual void times(double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
And for scaling.
ClpPlusMinusOneMatrix::getNumElements
virtual CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix(int numberRows, int numberColumns, bool columnOrdered, const int *indices, const CoinBigIndex *startPositive, const CoinBigIndex *startNegative)
Constructor from arrays.
ClpPlusMinusOneMatrix::isColOrdered
virtual bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
ClpPlusMinusOneMatrix::subsetClone
virtual ClpMatrixBase * subsetClone(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
Subset clone (without gaps).
ClpPlusMinusOneMatrix::startPositive
CoinBigIndex * startPositive() const
Return starts of +1s.
Definition ClpPlusMinusOneMatrix.hpp:208
ClpPlusMinusOneMatrix::clone
virtual ClpMatrixBase * clone() const
Clone.
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
Subset constructor (without gaps).
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106