33 #ifndef ISOEX_MATRIXT_HH
34 #define ISOEX_MATRIXT_HH
58 MatrixT(
unsigned int _rows,
unsigned int _cols)
59 : rows_(_rows), cols_(_cols)
60 { data_.resize(_cols*_rows); }
66 assert (_i < rows_ && _j < cols_);
67 return data_[_i * cols_ + _j];
71 const T&
operator()(
unsigned int _i,
unsigned int _j)
const
73 assert (_i < rows_ && _j < cols_);
74 return data_[_i * cols_ + _j];
78 unsigned int rows()
const {
return rows_; }
81 unsigned int cols()
const {
return cols_; }
85 unsigned int rows_, cols_;
103 { data_.resize(_n); }
120 unsigned int dim()
const {
return n_; }
124 std::vector<T> data_;
132 #endif // ISOEX_MATRIXT_HH defined
unsigned int dim() const
Return vector's dimension.
Definition: MatrixT.hh:120
VectorT(unsigned int _n)
Construct with dimension.
Definition: MatrixT.hh:102
unsigned int cols() const
Number of columns.
Definition: MatrixT.hh:81
Definition: MatrixT.hh:97
unsigned int rows() const
Number of rows.
Definition: MatrixT.hh:78
T & operator()(unsigned int _i)
Read & write element access.
Definition: MatrixT.hh:106
const T & operator()(unsigned int _i, unsigned int _j) const
Read only element access.
Definition: MatrixT.hh:71
A type for volume images, or 3D textures.
MatrixT(unsigned int _rows, unsigned int _cols)
Construct with number of rows and columns.
Definition: MatrixT.hh:58
T & operator()(unsigned int _i, unsigned int _j)
Read & write element access.
Definition: MatrixT.hh:64
Definition: MatrixT.hh:53
const T & operator()(unsigned int _i) const
Read only element access.
Definition: MatrixT.hh:113