cylp.cy.CyCoinPackedMatrix
¶
-
class
cylp.cy.CyCoinPackedMatrix.
CyCoinPackedMatrix
¶ CyCoinPackedMatrix
interfacesCoinPackedMatrix
Usage Example
>>> import numpy as np >>> from cylp.cy import CyCoinPackedMatrix >>> rows = np.array([1, 3, 4], np.int32) >>> cols = np.array([0, 2, 1], np.int32) >>> elements = np.array([1.5, -1, 2]) >>> # colOrdered is True if we store the matrix by column (csc) >>> m = CyCoinPackedMatrix(colOrdered=True, rowIndices=rows, ... colIndices=cols, elements=elements) >>> m.majorDim 3 >>> m.minorDim 5
-
appendCol
(self, ndarray vecInd=None, ndarray elements=None)¶
-
appendRow
(self, ndarray vecInd=None, ndarray elements=None)¶
-
dumpMatrix
(self, char *s)¶
-
hasGaps
(self)¶
-
removeGaps
(self, removeValue=-1.0)¶
-
reserve
(self, newMaxMajorDim, newMaxSize, create=0)¶
-