-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add associated return type for Centroid algorithm trait. #154
Conversation
In the future, we can remove the |
src/algorithm/centroid.rs
Outdated
@@ -6,6 +6,8 @@ use algorithm::distance::Distance; | |||
|
|||
/// Calculation of the centroid. | |||
pub trait Centroid<T: Float> { | |||
type Centroid; |
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.
i originally titled this Result
, but that's confusing since there's std::result::Result
which is conceptually different
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.
👍
src/algorithm/centroid.rs
Outdated
@@ -6,6 +6,8 @@ use algorithm::distance::Distance; | |||
|
|||
/// Calculation of the centroid. | |||
pub trait Centroid<T: Float> { | |||
type Centroid; |
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.
actually, maybe Output
would be a better name here. i'm doing the same thing with bounding box right now and it's confusing that the trait is BoundingBox
, the associated return type name is BoundingBox
and the actual return type is Bbox
.
7a55477
to
10330f1
Compare
bors r+ |
Build succeeded |
No description provided.