Cerata
A library to generate structural hardware designs
|
A matrix used for TypeMapper. More...
#include <flattype.h>
Public Member Functions | |
MappingMatrix (int64_t height, int64_t width) | |
Construct a mapping matrix. More... | |
int64_t | height () |
Return the height of the matrix. | |
int64_t | width () |
Return the width of the matrix. | |
T & | get (int64_t y, int64_t x) |
Return a reference to a value in the matrix at some index. | |
const T & | get (int64_t y, int64_t x) const |
Return a const references to a value in the matrix at some index. | |
T & | operator() (int64_t y, int64_t x) |
Return a reference to a value in the matrix at some index. | |
const T & | operator() (int64_t y, int64_t x) const |
Return a const references to a value in the matrix at some index. | |
bool | IsIdentity () const |
Return true if this is an identity matrix. | |
T | MaxOfColumn (int64_t x) const |
Return the maximum of some column. | |
T | MaxOfRow (int64_t y) const |
Return the maximum of some row. | |
std::vector< std::pair< int64_t, T > > | mapping_column (int64_t x) |
Obtain non-zero element indices and value from column x, sorted by value. | |
std::vector< std::pair< int64_t, T > > | mapping_row (int64_t y) |
Obtain non-zero element indices and value from row y, sorted by value. | |
MappingMatrix & | SetNext (int64_t y, int64_t x) |
Set the next (existing maximum + 1) value in a matrix at some position. | |
MappingMatrix | Transpose () const |
Transpose the matrix. | |
MappingMatrix | Empty () const |
Create an empty matrix of the same size. | |
std::string | ToString () |
Static Public Member Functions | |
static MappingMatrix | Identity (int64_t dim) |
Return a square identity matrix. | |
A matrix used for TypeMapper.
T | The type of matrix elements. |
Definition at line 109 of file flattype.h.
|
inline |
Construct a mapping matrix.
height | The height of the matrix. |
width | The width of the matrix. |
Definition at line 116 of file flattype.h.
|
inline |
Definition at line 248 of file flattype.h.