move Eigen format definition to Matrix.h
parent
ac69115e34
commit
e8986ba382
|
@ -139,16 +139,6 @@ Vector operator^(const Matrix& A, const Vector & v) {
|
|||
/* ************************************************************************* */
|
||||
//3 argument call
|
||||
void print(const Matrix& A, const string &s, ostream& stream) {
|
||||
static const Eigen::IOFormat matlab(
|
||||
Eigen::StreamPrecision, // precision
|
||||
0, // flags
|
||||
", ", // coeffSeparator
|
||||
";\n", // rowSeparator
|
||||
"\t", // rowPrefix
|
||||
"", // rowSuffix
|
||||
"[\n", // matPrefix
|
||||
"\n]" // matSuffix
|
||||
);
|
||||
cout << s << A.format(matlab) << endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,18 @@ GTSAM_MAKE_MATRIX_DEFS(9);
|
|||
typedef Eigen::Block<Matrix> SubMatrix;
|
||||
typedef Eigen::Block<const Matrix> ConstSubMatrix;
|
||||
|
||||
// Matrix formatting arguments when printing. Akin to Matlab style.
|
||||
const Eigen::IOFormat matlab(
|
||||
Eigen::StreamPrecision, // precision
|
||||
0, // flags
|
||||
", ", // coeffSeparator
|
||||
";\n", // rowSeparator
|
||||
"\t", // rowPrefix
|
||||
"", // rowSuffix
|
||||
"[\n", // matPrefix
|
||||
"\n]" // matSuffix
|
||||
);
|
||||
|
||||
/**
|
||||
* equals with a tolerance
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue