cylp.cy.CyCoinPackedMatrix¶
- class cylp.cy.CyCoinPackedMatrix.CyCoinPackedMatrix[source]¶
CyCoinPackedMatrixinterfacesCoinPackedMatrixUsage 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