I'm using Coin-or Linear Programming library. I want to construct a ClpPlusMinusOneMatrix. Its constructor is:
ClpPlusMinusOneMatrix (int numberRows,
int numberColumns,
bool columnOrdered,
const int *indices,
const CoinBigIndex *startPositive,
const CoinBigIndex *startNegative);
It's not exactly clear what startPositive
and startNegative
are. If it's the same concept as described for another class here, then how does the matrix differentiate +1 and -1 vales?
For example, if I want to implement 1x4 matrix: [1 -1 1 -1]
. How does Clp know the value of the last two elements?
#include <coin/ClpPlusMinusOneMatrix.hpp>
int main()
{
int indices [4] {0, 1, 2, 3};
CoinBigIndex startPositive [2] {0, 4};
CoinBigIndex startNegative [2] {1, 4};
ClpPlusMinusOneMatrix(1, 4, false, indices, startPositive, startNegative);
}
Thanks