 Timestamp:
 Dec 21, 2018 3:19:20 PM (21 months ago)
 Location:
 trunk/Cbc/src
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/Cbc_C_Interface.cpp
r2433 r2453 715 715 const CoinBigIndex *starts = cpmRow>getVectorStarts(); 716 716 const double *rcoef = cpmRow>getElements() + starts[row]; 717 return rcoef; 718 } 719 720 /** Number of nonzero entries in a column */ 721 COINLIBAPI int COINLINKAGE 722 Cbc_getColNz(Cbc_Model * model, int col) 723 { 724 const CoinPackedMatrix *cpmCol = model>model_>solver()>getMatrixByCol(); 725 return cpmCol>getVectorLengths()[col]; 726 } 727 728 /** Indices of rows that a column appears */ 729 COINLIBAPI const int * COINLINKAGE 730 Cbc_getColIndices(Cbc_Model * model, int col) 731 { 732 const CoinPackedMatrix *cpmCol = model>model_>solver()>getMatrixByCol(); 733 const CoinBigIndex *starts = cpmCol>getVectorStarts(); 734 const int *cidx = cpmCol>getIndices() + starts[col]; 735 return cidx; 736 } 737 738 /** Coefficients that a column appear in rows */ 739 COINLIBAPI const double * COINLINKAGE 740 Cbc_getColCoeffs(Cbc_Model * model, int col) 741 { 742 const CoinPackedMatrix *cpmCol = model>model_>solver()>getMatrixByCol(); 743 const CoinBigIndex *starts = cpmCol>getVectorStarts(); 744 const double *rcoef = cpmCol>getElements() + starts[col]; 717 745 return rcoef; 718 746 } 
trunk/Cbc/src/Cbc_C_Interface.h
r2433 r2453 164 164 COINLIBAPI const double * COINLINKAGE 165 165 Cbc_getRowCoeffs(Cbc_Model * model, int row) 166 ; 167 /** Number of nonzero entries in a column */ 168 COINLIBAPI int COINLINKAGE 169 Cbc_getColNz(Cbc_Model * model, int col) 170 ; 171 /** Indices of rows that a column appears */ 172 COINLIBAPI const int * COINLINKAGE 173 Cbc_getColIndices(Cbc_Model * model, int col) 174 ; 175 /** Coefficients that a column appear in rows */ 176 COINLIBAPI const double * COINLINKAGE 177 Cbc_getColCoeffs(Cbc_Model * model, int col) 166 178 ; 167 179 /** Right hand side of a row */
Note: See TracChangeset
for help on using the changeset viewer.