Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make display generical for Omatrix #938

Merged
merged 3 commits into from Jul 11, 2021
Merged

Make display generical for Omatrix #938

merged 3 commits into from Jul 11, 2021

Conversation

Nateckert
Copy link
Contributor

@Nateckert Nateckert commented Jul 8, 2021

In the previous version, the test added in tests/core/matrix.rs failed to compile.

This version remove the dependency to the Allocator<usize>, so that the display implementation does not depend of the allocator of nalgebra, making it generical for OMatrix.

Not relying on Omatrix<usize, R, C> implies that some computation have to be done twice.
However, the performance hit is only in Display, which I find acceptable (the use case will be for debugging/writing logs)

The difference with the previous version is that val_width is called twice per entry instead of once.

@sebcrozet sebcrozet merged commit b007e19 into dimforge:dev Jul 11, 2021
@sebcrozet
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants