-
Notifications
You must be signed in to change notification settings - Fork 41
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
PartialOrd
for scalars
#573
PartialOrd
for scalars
#573
Conversation
@JosiahParry , ready for initial review :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if it passes test.. then it should be merged.
Funny thing it does not really solve the original problem -- vec![Rint::from(1), Rint::from(2)].iter().filter(|&x| x >= 2); |
That's what I was wondering about when I commented on #570. The reason |
Ah yeah, no problem! We already have some methods defined (mostly R-inspired), I can extend it to also include |
This reverts commit d34b6b7.
Scalar<T>
to initiate abstraction of common scalar propertiesPartialOrd
forRint
,Rfloat
,Rbool
(NA
-aware)min()/max()
onRint
&Rfloat
based onPartialOrd
From<Rint>
andFrom<i32>
forRfloat
(note thati32::MIN_VALUE
will not be treated asNA_real_
)Closes #570