All print function need get a parameter ostream

Issue #304 wontfix
Tal Regev created an issue

All print function need get a parameter ostream. For easy print to file or other ostream like string stream.

If not give parameter of ostream, it will use std::cout. (default parameter).

Comments (8)

  1. Frank Dellaert

    I'm thinking it might be better to have stream operators for every class and then reduce print as calling output on stdout (and maybe even retire it). Comments?

  2. Frank Dellaert

    GTSAM Is an open source project. If you want to add some functionality, you can fork and create a pull request. It might be good to think about how to do this so we can cherry pick the changes into develop as well.

  3. Mustafa Mukadam

    Thanks for the feature request. We would like to see this feature soon as well and will probably be a part of GTSAM 5.

  4. Frank Dellaert

    Actually, the feature I'd like to see is just a stream output operator that replaces print, as of GTSAM 5. That could be added now, if you want. Since GTSAM is open source, you could create a PR for a few of the basic types as a design review, and then complete the PR for all types after comments.

  5. Log in to comment