Summary: | min/max with a scalar | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Eigen | Reporter: | abachrach | ||||||
Component: | Core - general | Assignee: | Nobody <eigen.nobody> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | enhancement | CC: | abachrach, gael.guennebaud, jacob.benoit.1, jitseniesen | ||||||
Priority: | Normal | ||||||||
Version: | unspecified | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
abachrach
2012-01-05 22:47:13 UTC
Created attachment 243 [details]
a patch to implement scalar min/max
Please find attached a patch that implements this feature.
As gael suggested, I made the method an alias to calling min/max with a constant array.
The patch also includes a scalar argument method for the matrix class in cwiseMin/Max.
thanks!
Oh yah, and everything seems happy with running "make check". Comment on attachment 243 [details] a patch to implement scalar min/max Review of attachment 243 [details]: ----------------------------------------------------------------- sounds good except that it's missing testing, see test/array.h (for min/max) and test/array_for_matrix.cpp (for cwiseMin/Max) right... I had looked into writing tests, but wasn't sure where it should go and then didn't. I'll do that shortly. -=Abe Created attachment 246 [details]
A new patch that implements the features and has tests
Created a new patch that implements the scalar min/max functions along with the necessary testing routines.
I cannot see anything wrong with it, so I committed the patch (changeset ec430a9cb055). Thanks very much for your help. glad to be of service! thanks, -=Abe -- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/400. |