85 TMatOrdering(
TMat *M):
90 struct ColumnOrder :
public TMatOrdering {
94 bool operator()(
const int& i,
const int& j){
105 struct RowOrder :
public TMatOrdering {
108 bool operator()(
const int& i,
const int& j){
138 size_t oldSize = ordering.size();
139 ordering.resize(newSize);
140 for(
size_t i = oldSize ; i < newSize ; i++)
141 ordering[i] =
static_cast<int>(i);
A small wrap around std::vector to give easy access to array for interfacing with fortran code.
(C) Copyright International Business Machines Corporation 2007
void resizeAndCopyArray(X *&array, unsigned int oldSize, unsigned int newSize)
int numNonEmptyRows()
Get number of non empty rows.
TMat()
Default constructor.
void removeDuplicates()
Remove the duplicated entries.
TMat & operator=(const CoinPackedMatrix &M)
Assignment from a CoinPackedMatrix.
const vector< int > & orderByColumns()
Orders current matrix by columns.
TMat(const CoinPackedMatrix &M, MatrixStorageType T)
Construct from a CoinPackedMatrix.
void resizeOrdering(vector< int > &ordering, unsigned int newSize)
void make_upper_triangular(const MatrixStorageType &T)
void create(const CoinPackedMatrix &M)
Create the TMat from M.
void make_full_upper_triangular()
int numNonEmptyCols()
Get number of non empty cols.
vector< int > columnOrdering_
const RowS & nonEmptyCols() const
Get the list of non empty row.
vector< std::pair< int, int > > RowS
Storage for non empty rows.
TMat(const TMat &other)
Copy constructor.
void makeQuadUpperDiag()
Assuming that this is representing a quadratic form.
void make_lower_to_be_upper()
const RowS & nonEmptyRows() const
Get the list of non empty row.
const vector< int > & orderByRows()
Orders current matrix by rows.
vector< int > rowOrdering_
TMat & operator=(const TMat &rhs)
Assignment operator.