CyLP.cy.CyCoinIndexedVector

class CyLP.cy.CyCoinIndexedVector.CyCoinIndexedVector

CyCoinIndexedVector interfaces CoinIndexedVector.

Usage

>>> from CyLP.cy import CyCoinIndexedVector
>>> vector = CyCoinIndexedVector()
>>> vector.reserve(5)
>>> vector[3] = 4
>>> vector[3]
4.0
>>> vector[[1, 3, 4]] = 2.1
>>> [vector[i] for i in [1, 3, 4]] == 3 * [2.1]
True
>>> vector[[0, 2]] = [-1, -2]
>>> [vector[i] for i in [0, 2]] == [-1, -2]
True
Print(self)
assign(self, ind, other)
clear(self)
empty(self)
reserve(self, n)

Previous topic

CyLP.cy.CyCoinMpsIO

Next topic

CyLP.cy.CyCoinPackedMatrix

This Page