aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/IO.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2013-10-17 13:49:56 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2013-10-17 13:49:56 +0200
commit4d7dfafbe74f8fd05811ca75e095a23c773e2a2b (patch)
tree4362b68403d2568c6ca038c34092f36b518adaca /Eigen/src/Core/IO.h
parent3390db099a086c4cc5c9b90cb0ae339c4ba93832 (diff)
Don't add rowSpacer if columns are not to be aligned
Diffstat (limited to 'Eigen/src/Core/IO.h')
-rw-r--r--Eigen/src/Core/IO.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h
index c8d5f6379..7e8cb8c0b 100644
--- a/Eigen/src/Core/IO.h
+++ b/Eigen/src/Core/IO.h
@@ -49,7 +49,7 @@ std::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat&
*/
struct IOFormat
{
- /** Default contructor, see class IOFormat for the meaning of the parameters */
+ /** Default constructor, see class IOFormat for the meaning of the parameters */
IOFormat(int _precision = StreamPrecision, int _flags = 0,
const std::string& _coeffSeparator = " ",
const std::string& _rowSeparator = "\n", const std::string& _rowPrefix="", const std::string& _rowSuffix="",
@@ -57,6 +57,10 @@ struct IOFormat
: matPrefix(_matPrefix), matSuffix(_matSuffix), rowPrefix(_rowPrefix), rowSuffix(_rowSuffix), rowSeparator(_rowSeparator),
rowSpacer(""), coeffSeparator(_coeffSeparator), precision(_precision), flags(_flags)
{
+ // TODO check if rowPrefix, rowSuffix or rowSeparator contains a newline
+ // don't add rowSpacer if columns are not to be aligned
+ if((fmt.flags & DontAlignCols))
+ return;
int i = int(matSuffix.length())-1;
while (i>=0 && matSuffix[i]!='\n')
{