Initialize the new PMC
Destroy the PMC and free all associated memory
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 a floating point value at the location specified by the key. The floating
point value is calculated as the magnitude of the complex value at the point in
the matrix.
Get an integer value at the location specified by the key.
The integer value is the magnitude of the complex value at the specified
location, cast from a floating point to an integer value.
Get the string representation of the complex value at the point specified by
the key. The returned string has the same format as is used by the current
HLL-mapped Complex PMC type.
Get a Complex PMC from the point specified by the key.
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 a floating point number, the magnitude of the complex value, at the
specified location in the array
Get an integer, cast from the magnitude of the complex value, at the specified
location in the array
Get a string representation of the value at the specified point. Stringification
is done the same as Parrot’s Complex PMC type.
Get a Complex PMC from the value at the specified point.
Set the value at the specified location to the complex value represented by the
given PMC. Different PMC types have different behaviors in this operation.
Set the value at the specified location to have a real value given by the
number, and 0 for the complex value.
Set the value at the specified location to the value represented by the string.
The string is parsed by creating a temporary Complex PMC type, so all the same
rules for that type apply to the input string format.
Set the value at the specified location to have a real value given by the
integer, and 0 for the complex value.
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 a PMC at the specified location. The rules for extracting a complex value
out of the input PMC are the same as used for set_pmc_keyed()
Set the complex value at the specified location to the given real value. The
complex part of the value will be 0.
Set the complex value at the specified location to the given real value. The
complex part of the value will be 0
Convert the string to a Complex PMC, and set that at the specified location.
Get a string representation of the matrix, suitable for printing to the console
Get a named attribute. The name can be one of “rows”, “cols”, or “size”.
Clone the matrix
Determine if two matrices are equal in size and composition.
Freeze the PMC for serialization to a string suitable for long-term storage in
a file.
Thaw a serialized PMC