Skip to content

Formatter options for fmt_eigen #24263

Description

@jwnimmer-tri

Is your feature request related to a problem? Please describe.

When outputting an Eigen matrix as part of a log message or error text, we might need to control how it gets formatted (e.g., sig figs, leading zeros, comma vs whitespace, transpose, etc).

Describe the solution you'd like

Enhance drake::fmt_eigen to do our own matrix layouts, respecting the format specification mini-language.

(See also https://fmt.dev/latest/syntax.html#range-format-specifications.)

(See also https://eigen.tuxfamily.org/dox/structEigen_1_1IOFormat.html.)

Describe alternatives you've considered

N/A

Additional context

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions