Utilities¶
modpipe.crc64
– Simple cyclic redundancy check¶
Simple cyclic redundancy check. This is based on the Perl implementation in SWISS::CRC64, which in turn is described by ISO 3309.
- modpipe.crc64.digest(s)¶
Return the 64-bit CRC of a string, as a 16-byte hex-encoded string.
modpipe.matrix2d
– Simple 2D matrix class¶
- class modpipe.matrix2d.Matrix2D(rows, cols)¶
Simple 2D matrix class. Once an object is created, it can be assigned to or read using the standard [] operator, passing a row and column (0-based). For example:
m = Matrix2D(5,5) print m[0,0] m[4,0] = 'test'
- write(file=None, dimensions=True)¶
Write out to the named file. If dimensions is True, also write the number of rows and columns in the matrix. The file format is suitable for input to Modeller methods that read matrices.