CMatrix:RowExists
The RowExists method returns true if the CMatrix contains a row at index n.
bTrue = CMatrix:RowExists( n ) |
n is the index of the row to be tested.
If the row exists at index n, true is returned.
If the row does not exists, false is returned.
Since Lua matrices are sparse, there does not need to be a row at index n. Moreover, the CMatrix cannot contain a row having less than 1 column. If true is returned, then a row exists at index n and it contains at least 1 column member.
The following script returns false (printed as integer value 0) after a row is removed, then tested:
|
-- create a CMatrix object |
|
-- set member in row 1 |
|
-- set member in row 1 |
|
-- set member in row 2 |
|
-- set member in row 2 |
|
-- remove the row at index 2 |
|
-- result: Exists = 0 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.