MyraMath
|
Represents a const MatrixRange. More...
#include <MatrixRange.h>
Public Types | |
typedef std::pair< CMatrixRange< Number >, CMatrixRange< Number > > | Pair |
Public Member Functions | |
CMatrixRange () | |
Default constructs a size 0x0 range. | |
CMatrixRange (const Number *in_begin, int in_I, int in_J, int in_LD) | |
Constructs from components. | |
CMatrixRange (const Number *in_begin, int in_I, int in_J) | |
Constructs onto contiguous underlying storage of size I*J. | |
void | write (OutputStream &out) const |
Writes to OutputStream. Layout compatible with Matrix's InputStream constructor. | |
std::pair< int, int > | size () const |
Size inspector. | |
uint64_t | n_words () const |
Storage requirements. | |
MatrixRange< Number > | remove_const () const |
Casts away "const" (C) qualifier, returning a MatrixRange<Number> | |
CMatrixRange< Number > | window (int i0, int i1, int j0, int j1) const |
Returns this(i0:i1,j0:j1) | |
Array2< CMatrixRange< Number > > | windows (const intCRange &i, const intCRange &j) const |
Tile rows and columns using given sizes. | |
const Number & | operator() (int i, int j) const |
Random accessor. | |
const Number & | at (int i, int j) const |
Bounds checked random accessor. | |
CMatrixRange< Number > | row (int i) const |
Returns this(i,:) | |
CMatrixRange< Number > | rows (int i0, int i1) const |
Returns this(i0:i1,:) | |
Array1< CMatrixRange< Number > > | rows (const intCRange &i) const |
Returns {this.rows(0:i0,:), this.rows(i0:i0+i1,:), ...}, tiling by rows. | |
CMatrixRange< Number > | top (int i) const |
Returns the i topmost rows, this(0:i,:) | |
CMatrixRange< Number > | cut_top (int i) const |
Cuts the i topmost rows, returns this(i:I,:) | |
Pair | split_top (int i) const |
Splits by rows, returns [this->top(i), this->cut_top(i)]. | |
CMatrixRange< Number > | bottom (int i) const |
Returns the i bottommost rows, this(I-i:I,:) | |
CMatrixRange< Number > | cut_bottom (int i) const |
Cuts the i bottommost rows, returns this(0:I-i,:) | |
Pair | split_bottom (int i) const |
Splits by rows, returns [this->cut_bottom(i), this->bottom(i)]. | |
CMatrixRange< Number > | column (int j) const |
Returns this(:,j) | |
CMatrixRange< Number > | columns (int j0, int j1) const |
Returns this(:,j0:j1) | |
Array1< CMatrixRange< Number > > | columns (const intCRange &j) const |
Returns {this.columns(:,0:j0), this.columns(:,j0:j0+j1), ...}, tiling by columns. | |
CMatrixRange< Number > | left (int j) const |
Returns the j leftmost columns, this(:,0:j) | |
CMatrixRange< Number > | cut_left (int j) const |
Cuts the j leftmost columns, returns this(:,j:J) | |
Pair | split_left (int j) const |
Splits by columns, returns [this->left(j), this->cut_left(j)]. | |
CMatrixRange< Number > | right (int j) const |
Returns the j rightmost columns, this(:,J-j:J) | |
CMatrixRange< Number > | cut_right (int j) const |
Cuts the j rightmost columns, returns this(:,0:J-j) | |
Pair | split_right (int j) const |
Splits by columns, returns [this->cut_right(j), this->right(j)]. | |
CVectorRange< Number > | vector (int j) const |
Returns the j'th column as a CVectorRange. | |
Public Attributes | |
const Number * | begin |
---------— Data members, all public ----------------— | |
int | I |
---------— Data members, all public ----------------— | |
int | J |
---------— Data members, all public ----------------— | |
int | LD |
---------— Data members, all public ----------------— | |
Represents a const MatrixRange.