16 iRow_(NULL), jCol_(NULL), value_(NULL), nnz_(other.nnz_),
17 capacity_(other.nnz_), columnOrdering_(other.columnOrdering_),
18 rowOrdering_(other.rowOrdering_), nonEmptyRows_(), nonEmptyCols_(){
26 iRow_(NULL), jCol_(NULL), value_(NULL), nnz_(M.getNumElements()),
27 capacity_(M.getNumElements()), columnOrdering_(), rowOrdering_(),
28 nonEmptyRows_(), nonEmptyCols_(){
69 if(!M.isColOrdered()){
70 std::cout<<
"Matrix is not col ordered"<<std::endl;
76 int numcols = M.getMajorDim();
77 const int * start = M.getVectorStarts();
78 const int * length = M.getVectorLengths();
79 const int * indice = M.getIndices();
80 const double * value = M.getElements();
82 for(
int i = 0 ; i < numcols ; i++){
84 int end = start[i] + length[i];
85 for(
int k = begin ;
k <
end ;
k++){
87 iRow[
nnz] = indice[
k];
105 if(
nnz_ == 0)
return 0;
110 for(
int i = 1 ; i <
nnz_ ; i++){
124 if(
nnz_ == 0)
return 0;
129 for(
int i = 1 ; i <
nnz_ ; i++){
142 for(
int i = 1; i <
nnz_ ; i++){
163 for(
int i = 0 ; i <
nnz_ ; i++){
168 for(
int i = 0 ; i <
nnz_ ; i++){
177 for(
int i = 0 ; i <
nnz_ ; i++){
195 for(
int i = 0 ,
j = 0; i <
nnz_ &&
j <
nnz_ ;){
206 for(
int i = 0 ; i <
nnz_ ; i++){
Stores the whole matrix of a non-symetric Q.
void make_lower_to_be_upper()
Assuing that this is representing the lower triangle of a symetric matrix makes it the upper triangle...
int numNonEmptyCols()
Get number of non empty cols.
void make_upper_triangular(const MatrixStorageType &T)
TMat & operator=(const TMat &rhs)
Assignment operator.
vector< int > rowOrdering_
const vector< int > & orderByColumns()
Orders current matrix by columns.
TMat()
Default constructor.
const vector< int > & orderByRows()
Orders current matrix by rows.
Stores only the upper triangle of a symetric Q.
void make_full_upper_triangular()
Assuming that this is representing a quadratic form.
vector< int > columnOrdering_
Stores the lower triangle of a symetric Q.
int nnz
ATTENTION: Filter expect the jacobian to be ordered by row.
void removeDuplicates()
Remove the duplicated entries.
void resizeAndCopyArray(X *&array, unsigned int oldSize, unsigned int newSize)
void create(const CoinPackedMatrix &M)
Create the TMat from M.
int numNonEmptyRows()
Get number of non empty rows.