GSLAM  3.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Matrix< Scalar, Rows, Cols > Class Template Reference

Public Member Functions

 Matrix (const std::array< Scalar, Rows *Cols > &c)
 
 Matrix (const Scalar data_[Rows *Cols])
 
 Matrix (const Scalar data_[Rows][Cols])
 
 Matrix (const Matrix &other)
 
Scalar * data ()
 
const Scalar * data () const
 
Scalar operator() (size_t i, size_t j) const
 
Scalar & operator() (size_t i, size_t j)
 
Matrix< Scalar, Rows, Cols > & operator= (const Matrix< Scalar, Rows, Cols > &other)
 
void copyTo (Scalar(&dst)[Rows *Cols]) const
 
void copyToRaw (Scalar *dst) const
 
void copyToColumnMajor (Scalar(&dst)[Rows *Cols]) const
 
template<size_t P>
Matrix< Scalar, Rows, P > operator* (const Matrix< Scalar, Cols, P > &other) const
 
Matrix< Scalar, Rows, Cols > emult (const Matrix< Scalar, Rows, Cols > &other) const
 
Matrix< Scalar, Rows, Cols > edivide (const Matrix< Scalar, Rows, Cols > &other) const
 
Matrix< Scalar, Rows, Cols > operator+ (const Matrix< Scalar, Rows, Cols > &other) const
 
Matrix< Scalar, Rows, Cols > operator- (const Matrix< Scalar, Rows, Cols > &other) const
 
Matrix< Scalar, Rows, Cols > operator- () const
 
void operator+= (const Matrix< Scalar, Rows, Cols > &other)
 
void operator-= (const Matrix< Scalar, Rows, Cols > &other)
 
template<size_t P>
void operator*= (const Matrix< Scalar, Cols, P > &other)
 
Matrix< Scalar, Rows, Cols > operator* (Scalar scalar) const
 
Matrix< Scalar, Rows, Cols > operator/ (Scalar scalar) const
 
Matrix< Scalar, Rows, Cols > operator+ (Scalar scalar) const
 
Matrix< Scalar, Rows, Cols > operator- (Scalar scalar) const
 
void operator*= (Scalar scalar)
 
void operator/= (Scalar scalar)
 
void operator+= (Scalar scalar)
 
void operator-= (Scalar scalar)
 
bool operator== (const Matrix< Scalar, Rows, Cols > &other) const
 
bool operator!= (const Matrix< Scalar, Rows, Cols > &other) const
 
bool equal (const Matrix< Scalar, Rows, Cols > &y, const Scalar eps=1e-4f)
 
Matrix< Scalar, Cols, Rows > transpose () const
 
Matrix< Scalar, Cols, Rows > T () const
 
template<size_t P, size_t Q>
Matrix< Scalar, P, Q > slice (size_t x0, size_t y0) const
 
template<size_t P, size_t Q>
void set (const Matrix< Scalar, P, Q > &m, size_t x0, size_t y0)
 
void setRow (size_t i, const Matrix< Scalar, Cols, 1 > &row)
 
void setCol (size_t j, const Matrix< Scalar, Rows, 1 > &col)
 
void setZero ()
 
void zero ()
 
void setAll (Scalar val)
 
void setOne ()
 
void setIdentity ()
 
void identity ()
 
void swapRows (size_t a, size_t b)
 
void swapCols (size_t a, size_t b)
 
Matrix< Scalar, Rows, Cols > abs () const
 
Scalar max () const
 
Scalar min () const
 
int rows () const
 
int cols () const
 

Static Public Member Functions

static Matrix< Scalar, Rows, Cols > zeros ()
 
static Matrix< Scalar, Rows, Cols > ones ()
 

Public Attributes

Scalar _data [Rows][Cols] {}