Thread: Nearest Neighbor

  1. #1
    cout<<"Wakka Wakka"<<endl
    Join Date
    May 2004
    Posts
    35

    Nearest Neighbor

    Hello all,

    Just a quick question. Would anyone know where I might could find a tutorial on Nearest Neighbor with C++? I've searched extensively over the internet for the past month and a half and have been unable to find anything. I find plenty of programs out there written for it but I dont want to rip their stuff off. I want to understand it. If there is a book that would be helpful I would also like to know that as well.

  2. #2
    Registered User
    Join Date
    Jul 2004
    Posts
    101
    By "nearest neighbor" do you mean a graph algorithm?

  3. #3
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    if you need help with graph algorithms, i preemptively suggest robert sedgewicks "algorithms in c++: volume 5"
    .sect signature

  4. #4
    cout<<"Wakka Wakka"<<endl
    Join Date
    May 2004
    Posts
    35
    Yes I am inquiring about a graph algorithm. Thank you for the suggestion ggs, I will definitley look into that book.

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    101
    >>Yes I am inquiring about a graph algorithm.
    I received a great many hits from a search on www.google.com. How many were relevant I am not sure, though most of them appeared to be what you are looking for including implementations in C++.

  6. #6
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    CheyenneWay:
    I find plenty of programs out there written for it but I dont want to rip their stuff off.
    Princeton:
    most of them appeared to be what you are looking for including implementations in C++.
    Just thought I'd point out the irony...
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #7
    Registered User
    Join Date
    Jul 2004
    Posts
    101
    >>I find plenty of programs out there written for it but I dont want to rip their stuff off.
    I honestly missed that. Though reading code so that you might understand the algorithm better and develop your own implementation is hardly a "rip off", it is a valuable and enriching practice. Most algorithms are in the public domain as well, so it is only a rip off if you copy large portions of an implementation without permission and call it your own. Reading for comprehension is a good thing and I encourage it. Reading for plagiarism is not a good thing.

    My answer remains the same despite not reading the question in its entirety.

  8. #8
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    Most algorithms are in the public domain as well, so it is only a rip off if you copy large portions of an implementation without permission and call it your own.
    exactly, what you should do is the followiing:

    1) read several implementations and try to understand the differences and their effects on the systems integrity/efficiency/etc.

    2) write your own implementation. If you followed step one appropriately, you should be able to go pretty far without using a reference every minute.

    3) include in you documentation a little "thank you" section which includes the works you referenced to complete your work.
    there used to be something here, but not anymore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Displaying Time to the Nearest Tenth of a Second
    By bengreenwood in forum C++ Programming
    Replies: 5
    Last Post: 08-04-2008, 08:41 AM
  2. Nearest value in array
    By shibby in forum C Programming
    Replies: 3
    Last Post: 04-08-2007, 11:41 AM
  3. Replies: 4
    Last Post: 10-16-2006, 12:04 PM
  4. Calculate nearest number?
    By electrolove in forum C Programming
    Replies: 10
    Last Post: 02-21-2003, 06:13 AM
  5. rounding to nearest penny
    By sizzle_chest in forum C++ Programming
    Replies: 6
    Last Post: 09-06-2001, 03:57 PM