wxMaxima
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
MatrixBlock Struct Reference

A rectangular block of a matrix's entries: a sub-matrix (GH #2345) More...

#include <MatrixBlock.h>

Public Member Functions

std::size_t Rows () const
 
std::size_t Columns () const
 
bool Contains (std::size_t row, std::size_t col) const
 
bool operator== (const MatrixBlock &) const =default
 

Static Public Member Functions

static MatrixBlock Spanning (const MatrixEntry &a, const MatrixEntry &b)
 The smallest block holding both entries: the rectangle they are corners of.
 

Data Fields

std::size_t firstRow = 0
 
std::size_t lastRow = 0
 
std::size_t firstCol = 0
 
std::size_t lastCol = 0
 

Detailed Description

A rectangular block of a matrix's entries: a sub-matrix (GH #2345)

Row and column indices are the matrix's own, zero-based and inclusive, so a block always holds at least one entry. Rows or columns the worksheet elides are still part of a block that spans them: a block is a piece of the matrix, not of what happens to be on screen.

Kept in a header of its own so that DocumentCellPointers, which stores the selected block, needn't include MatrCell.h.


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