CMatrix:Members
The Count method returns the total number of members in the CMatrix object.
number = CMatrix:Members() where |
number is the number of members defined in the matrix. On failure or if the matrix is empty, 0 is returned.
This method returns the number of members (or values) in the CMatrix. This is not the same thing as the maximum index in either the column or row direction. For example, if the CMatrix has 3 members in these two rows: members at indices [1][1], [2][1], and [1000][1]. Then members = 3, but Count = 2
Suppose a CMatrix assigned to M contains 3 members as shown below:
|
-- create a CMatrix |
|
-- set member 2, 44 |
|
-- set member 50, 20 |
|
-- set member 120, 2 |
|
-- result: N = 3 |