sequencetools.CyclicMatrix

Inheritance diagram of abjad.tools.sequencetools.CyclicMatrix.CyclicMatrix.CyclicMatrix

class abjad.tools.sequencetools.CyclicMatrix.CyclicMatrix.CyclicMatrix(*args, **kwargs)[source]

New in version 2.0.

Abjad model of cyclic matrix.

Initialize from rows:

abjad> from abjad.tools import sequencetools
abjad> cyclic_matrix = sequencetools.CyclicMatrix([[0, 1, 2, 3], [10, 11, 12, 13], [20, 21, 22, 23]])
abjad> cyclic_matrix
CyclicMatrix(3x4)
abjad> cyclic_matrix[2]
CyclicTuple([20, 21, 22, 23])
abjad> cyclic_matrix[2][2]
22
abjad> cyclic_matrix[99]
CyclicTuple([0, 1, 2, 3])
abjad> cyclic_matrix[99][99]
3

Initialize from columns:

abjad> cyclic_matrix = sequencetools.CyclicMatrix(columns = [[0, 10, 20], [1, 11, 21], [2, 12, 22], [3, 13, 23]])
abjad> cyclic_matrix
CyclicMatrix(3x4)
abjad> cyclic_matrix[2]
CyclicTuple([20, 21, 22, 23])
abjad> cyclic_matrix[2][2]
22
abjad> cyclic_matrix[99]
CyclicTuple([0, 1, 2, 3])
abjad> cyclic_matrix[99][99]
3

CyclicMatrix implements only item retrieval in this revision.

Concatenation and division remain to be implemented.

Standard transforms of linear algebra remain to be implemented.

Read-only Properties

CyclicMatrix.columns[source]

Read-only columns:

abjad> cyclic_matrix = sequencetools.CyclicMatrix([[0, 1, 2, 3], [10, 11, 12, 13], [20, 21, 22, 23]])
abjad> cyclic_matrix.columns
CyclicTuple([[0, 10, 20], [1, 11, 21], [2, 12, 22], [3, 13, 23]])

Return cyclic tuple.

CyclicMatrix.rows[source]

Read-only rows:

abjad> cyclic_matrix = sequencetools.CyclicMatrix([[0, 1, 2, 3], [10, 11, 12, 13], [20, 21, 22, 23]])
abjad> cyclic_matrix.rows
CyclicTuple([[0, 1, 2, 3], [10, 11, 12, 13], [20, 21, 22, 23]])

Return cyclic tuple.

Special Methods

CyclicMatrix.__delattr__()

x.__delattr__(‘name’) <==> del x.name

Note

Inherited from __builtin__.object

CyclicMatrix.__eq__(arg)

True when id(self) equals id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__getitem__(expr)[source]
CyclicMatrix.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

CyclicMatrix.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__ne__(arg)

True when id(self) does not equal id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

CyclicMatrix.__repr__()[source]
CyclicMatrix.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

CyclicMatrix.__str__() <==> str(x)

Note

Inherited from __builtin__.object

Table Of Contents

This Page