Fork me on GitHub

System VTABLEs

init

Initialize the new PMC

destroy

Destroy the PMC and free all associated memory

mark

Mark all the PMC contents of the matrix

Keyed lookup VTABLEs

In each of these cases, the specified Key PMC must have exactly two elements
to specify a location in the matrix. Attempting to retrieve a value outside the
boundaries of the matrix will throw an OUT_OF_BOUNDS exception.

get_number_keyed

Get the floating point value from the PMC at the specified coordinates.

get_integer_keyed

Get an integer value from the PMC at the specified coordinates.

get_string_keyed

Get the string representation of the PMC at the point specified by
the key.

get_pmc_keyed

Get a PMC from the point specified by the key.

Integer-Keyed Lookup VTABLEs

These VTABLEs treat the matrix, which is a contiguous region in memory, as a
linear array of values. The matrix data is stored by rows. These routines are
used for low-level access. Attempting to access a value
outside the bounds of the matrix will throw an OUT_OF_BOUNDS exception.

get_number_keyed_int

Get a floating point number from the PMC at the specified location.

get_integer_keyed_int

Get an integer from the PMC at the specified coordinates.

get_string_keyed_int

Get a string representation of the PMC at the specified point.

get_pmc_keyed_int

Get the PMC at the specified point.

Keyed Setter VTABLES

These VTABLEs insert new values into the matrix at a point specified by the
Key PMC. The Key PMC must have exactly two elements. If the matrix is not large
enough to accomodate the specified location, it will be grown with zero-padding
so that it is at least large enough to hold the specified point and all existing
data.

set_pmc_keyed

Insert the given PMC at the specified coordinates.

set_number_keyed

Insert a Float PMC at the specified coordinates.

set_string_keyed

Insert a String PMC at the specified coordinates.

set_integer_keyed

Insert an Integer PMC at the specified coordinates.

Integer-Keyed Setter VTABLEs

These VTABLEs treat the matrix as a linear array in memory and allow fast
lookup based on the integer offset of values in the array. These are low-level
routines and are not intended for general use.
Unlike the PMC-keyed VTABLEs, these routines will not automatically grow the
matrix if an index is provided which is outside the boundaries of the matrix.
In that case, an OUT_OF_BOUNDS exception will be thrown.

set_pmc_keyed_int

Insert the PMC at the specified location.

set_number_keyed_int

Insert a Float PMC at the specified location.

set_integer_keyed_int

Insert an Integer PMC at the specified location.

set_string_keyed_int

Insert a String PMC at the specified location.

Miscellaneous VTABLEs

get_string

Get a string representation of the matrix, suitable for printing to the console

get_attr_string

Get a named attribute. The name can be one of “rows”, “cols”, or “size”.

clone

Clone the matrix

is_equal

Determine if two matrices are equal in size and composition.

Serialization/Deserialization VTABLEs

freeze

Freeze the PMC for serialization to a string suitable for long-term storage in
a file.

thaw

Thaw a serialized PMC