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)