Macaulay2 Engine
Loading...
Searching...
No Matches
MatrixWindow Struct Reference

Half-open rectangular submatrix descriptor: [begin_row, end_row) x [begin_column, end_column). More...

#include <mat-arith.hpp>

Public Member Functions

 MatrixWindow (long x, long y, long nrows, long ncols)
bool sameSize (const MatrixWindow &b) const

Public Attributes

long begin_row
long begin_column
long end_row
long end_column

Detailed Description

Half-open rectangular submatrix descriptor: [begin_row, end_row) x [begin_column, end_column).

Note
AI-generated documentation. Verify against the source before relying on it.

Constructed as MatrixWindow(first_row, first_col, nrows, ncols) to make caller-side window math read naturally. Used by the dense / sparse matrix arithmetic templates to restrict an operation to a rectangular block without materialising a copy. sameSize returns true when two windows have matching dimensions, the precondition for entrywise add / subtract / copy.

Definition at line 61 of file mat-arith.hpp.


The documentation for this struct was generated from the following file: