CMatrix Class
The CMatrix class manages a 2-dimensional matrix. The members (or elements) of the matrix are usually numbers but may be any type of value, such as strings or references to other types. The class implements a matrix as a Lua table of (row, CArray) pairs, with each row being a CArray of (column, value) pairs.
See the detailed description of the CMatrix class in Working with Matrices.
Construction |
Object = CMatrix:new() |
Destruction |
Object:delete() |
This class has no exposed properties.
Creates a new instance of the CMatrix class. Various constructors are available. |
|
Deletes the instance of the CMatrix object. |
Empties the contents of the CMatrix but does not delete it. |
|
Copies this CMatrix to a new CMatrix |
|
Lists all matrix elements in a text window. |
|
Returns the CArray used for a row. |
|
Returns the value at a (row, column) position in the matrix. |
|
Returns true if a specified row exists. |
|
Returns true if a value exists at the (row, column) index. |
|
Sets the value at a row, column index. |
|
Deletes an entire row from the matrix. |
|
Removes the value at a (row,column) index. |
|
Initializes all row x column entries to a value. |
|
Returns a count of total defined members. |
|
Returns the number the maximum row index used. |
|
Returns the number of rows actually initialized. |
|
Returns the maximum column index used in any row. |
|
Returns the number of columns initialized in any row. |
|
Returns the number of rows actually initialized. |
Normalizes to a volume of 1.0. |
|
Returns the sum of all matrix members. |