Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fortran question

Status
Not open for further replies.

dimosaaaa

Programmer
Joined
Aug 4, 2012
Messages
5
hello,hello!
Is there any expression in fortran, in order to find the two points which have more closely their coordinates?
thanks?
 
Sorry, what is your question ??
Which points are meant ? On teh screen ? In outer space ?

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
do YOU know the expression to find the distance between two points? Well, for starters, you could write a couple of nested do loops and evaluate the distance between all possible pair of points...welcome to programming.
 
There is non-trivial algorithm O(n*log n) solving this problem. It's far from "any expression" level code (search Google for nearest neighborn problem).

Brute force method O(n*n) - see salgerman's post above ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top