Opened 16 years ago
Closed 16 years ago
#272 closed enhancement (fixed)
vector_distance is not an optimal name
Reported by: | Peter | Owned by: | Markus Ringnér |
---|---|---|---|
Priority: | minor | Milestone: | yat 0.4 |
Component: | statistics | Version: | trunk |
Keywords: | Cc: |
Description
What is a better name?
distance?
range_distance?
Change History (4)
comment:1 Changed 16 years ago by
comment:3 Changed 16 years ago by
Status: | new → assigned |
---|
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
distance has the advantage that our functions calculate what is generally meant with distance in physical or mathematical sense. "distance between two points".
distance has the (dis)advantage that std::distance exists. std::distance takes two iterators and calculates the distance between the iterators. Our algorithms take three iterators and calculate the distance between the elements pointed to by iterators in the intervals defined by the three iterators. So our distance is somewhat different from std::distance but it is a well-accepted name and our functions have a different signature than std::distance.
If we do not expect users to be confused about functionality differences between std::distance and yat::distance, we should go for distance.
range_distance is not so good. It seems to be commonly used for distances related to the distance transmitting devices or machine guns can deliver across.