nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

Add 'compact-display' feature that prints vectors and matrices compactly

Open anderslanglands opened this issue 6 years ago • 2 comments

I use nalgebra for writing a renderer and other computer-graphics applications. I often print out vector and matrix data for debugging and information purposes, but the default Display implementation is extremely large, especially when printing an array of values.

This PR adds a feature, "compact-display" that switches to an alternate implementation which prints vectors and matrices as a parenthesized list of rows to save on space.

anderslanglands avatar Jan 02 '19 21:01 anderslanglands

A simpler approach is to use debug formatting on matrix.as_slice(), if you can stand column-major presentation.

Ralith avatar Jan 02 '19 21:01 Ralith

Hadn't thought of that, but it does make it a bit ugly and noisy at the call site.

anderslanglands avatar Jan 03 '19 05:01 anderslanglands

Closing this old PR due to lack of activity/interest. Thanks for the interest in nalgebra!

Andlon avatar Apr 03 '24 15:04 Andlon