From e6877dc27f9a030da6b1771f9421deefa642a07a Mon Sep 17 00:00:00 2001 From: dellaert Date: Thu, 4 Dec 2014 13:30:41 +0100 Subject: [PATCH] All MatrixMN matrices now defined --- gtsam/base/Matrix.h | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/gtsam/base/Matrix.h b/gtsam/base/Matrix.h index c6798859b..3ecfcf8fa 100644 --- a/gtsam/base/Matrix.h +++ b/gtsam/base/Matrix.h @@ -38,8 +38,18 @@ typedef Eigen::MatrixXd Matrix; typedef Eigen::Matrix MatrixRowMajor; // Create handy typedefs and constants for square-size matrices +// MatrixMN, MatrixN = MatrixNN, I_NxN, and Z_NxN, for M,N=1..9 #define GTSAM_MAKE_TYPEDEFS(SIZE, SUFFIX) \ typedef Eigen::Matrix Matrix##SUFFIX; \ +typedef Eigen::Matrix Matrix1##SUFFIX; \ +typedef Eigen::Matrix Matrix2##SUFFIX; \ +typedef Eigen::Matrix Matrix3##SUFFIX; \ +typedef Eigen::Matrix Matrix4##SUFFIX; \ +typedef Eigen::Matrix Matrix5##SUFFIX; \ +typedef Eigen::Matrix Matrix6##SUFFIX; \ +typedef Eigen::Matrix Matrix7##SUFFIX; \ +typedef Eigen::Matrix Matrix8##SUFFIX; \ +typedef Eigen::Matrix Matrix9##SUFFIX; \ static const Eigen::MatrixBase::IdentityReturnType I_##SUFFIX##x##SUFFIX = Matrix##SUFFIX::Identity(); \ static const Eigen::MatrixBase::ConstantReturnType Z_##SUFFIX##x##SUFFIX = Matrix##SUFFIX::Zero(); @@ -53,34 +63,6 @@ GTSAM_MAKE_TYPEDEFS(7,7); GTSAM_MAKE_TYPEDEFS(8,8); GTSAM_MAKE_TYPEDEFS(9,9); -typedef Eigen::Matrix Matrix12; -typedef Eigen::Matrix Matrix13; -typedef Eigen::Matrix Matrix14; -typedef Eigen::Matrix Matrix15; -typedef Eigen::Matrix Matrix16; - -typedef Eigen::Matrix Matrix21; -typedef Eigen::Matrix Matrix31; -typedef Eigen::Matrix Matrix41; -typedef Eigen::Matrix Matrix51; -typedef Eigen::Matrix Matrix61; - -typedef Eigen::Matrix Matrix23; -typedef Eigen::Matrix Matrix24; -typedef Eigen::Matrix Matrix25; -typedef Eigen::Matrix Matrix26; -typedef Eigen::Matrix Matrix27; -typedef Eigen::Matrix Matrix28; -typedef Eigen::Matrix Matrix29; - -typedef Eigen::Matrix Matrix32; -typedef Eigen::Matrix Matrix34; -typedef Eigen::Matrix Matrix35; -typedef Eigen::Matrix Matrix36; -typedef Eigen::Matrix Matrix37; -typedef Eigen::Matrix Matrix38; -typedef Eigen::Matrix Matrix39; - // Matrix expressions for accessing parts of matrices typedef Eigen::Block SubMatrix; typedef Eigen::Block ConstSubMatrix;