Finding distance

B

Bob Jenkins

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

-Bob
 
V

Victor Bazarov

Bob said:
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
question about C++ language or about a general programming technique?
 
T

Thomas Matthews

Bob said:
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.learn.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top