473,699 Members | 2,215 Online

# Finding distance

Set A={y1,y2,y3}
How can i find set B={y2-y1,y3-y2,y3-y1} in a fast way?
Thanks!

-Bob
Jul 23 '05 #1
2 1630
Bob Jenkins wrote:
Set A={y1,y2,y3}
How can i find set B={y2-y1,y3-y2,y3-y1} in a fast way?

Perhaps you could tell us what 'yN' is and what you consider "fast".
By "Set" or "set" do you mean 'std::set' or something else? Is your
Jul 23 '05 #2
Bob Jenkins wrote:
Set A={y1,y2,y3}
How can i find set B={y2-y1,y3-y2,y3-y1} in a fast way?
Thanks!

-Bob

How fast does it need to be?
How many times will the statement be calculated?
Is the program in a real-time scenario?
Why does it need to be done faster than the usual
distance formula?

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.