New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1327 - Additional formatting options in text IO
Summary: Additional formatting options in text IO
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.4 (development)
Hardware: All All
: Lowest Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords: JuniorJob
Depends on:
Blocks:
 
Reported: 2016-10-14 12:56 UTC by Ofri Sadowsky
Modified: 2016-10-14 13:29 UTC (History)
3 users (show)



Attachments

Description Ofri Sadowsky 2016-10-14 12:56:42 UTC
It would be nice to have vector and matrix formatting, such as with IOFormat, that is more similar to C's printf than the current one.

Specifically, the precision parameter in IOFormat is insufficient.  Per my trials, it specifies the total number of significant digits printed, but is not a full output specification.

In C, the "%##.##f" format includes: the total width of the field (before the dot) and the number of decimal digits after the dot.  I have cases in which the dynamic range of variables is large, e.g. a transformation where the rotation elements are in [0..1] and the translation elements are in any magnitude, possibly 10^6.  I'd like to print it as one matrix with 10 decimal digits after the dot, and a total width of 16 or 17.

In addition, in some cases I'd like to choose the padding.

Etc.

I hope some suggestion for this will come up in future versions of Eigen.
Comment 1 Christoph Hertzberg 2016-10-14 13:29:57 UTC
Hm, ok why not. But we will never be able to fulfill everyones use-cases regarding IO. So probably it will be easier for you to just write your own custom IO method.

Note You need to log in before you can comment on or make changes to this bug.