TriangleTrait
trait TriangleTrait (View source)
Methods
static callable
itemTriu(int $col, int $k, int $count, int $line = 1)
Fill zeros from first item to a position
static callable
itemTril(int $col, int $k, int $count, int $line = 1)
Fill zeros from a position to the end of the array
static NdArray
tri(int $rows, int $cols = null, int $k = 0)
Construct an array with ones at and below the given diagonal and zeros elsewhere
static callable
itemTri(int $col, int $k, int $maxCols, int|null $line = 1)
Return a closure that fill a line item with ones
Details
final static protected callable
itemTriu(int $col, int $k, int $count, int $line = 1)
Fill zeros from first item to a position
final static protected callable
itemTril(int $col, int $k, int $count, int $line = 1)
Fill zeros from a position to the end of the array
final static NdArray
tri(int $rows, int $cols = null, int $k = 0)
Construct an array with ones at and below the given diagonal and zeros elsewhere
final static protected callable
itemTri(int $col, int $k, int $maxCols, int|null $line = 1)
Return a closure that fill a line item with ones