By Daniel · January 1, 2009
Returns whether some square matrix M is a lower triangular matrix. M should be a ds_grid filled with real entries.
/* matrix_is_lower_triangular(M, strict)
*
* Returns whether some square matrix M is a lower triangular matrix. M
* should be a ds_grid filled with real entries.
*/
var xStart, i, j;
xStart = ds_grid_width(argument0) - 1;
for (i = 0; i < xStart + argument1; i += 1)
for (j = 0; j <= i; j += 1)
if (ds_grid_get(argument0, xStart - i + j, j) != 0)
return false;
return true;
Categories: Mathematics
There are no comments to display.
You must be signed in to post comments.