I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Index » Programming » C/C++ »

Compare between the similarity of rows

Nony2007\′s Photo
10 Feb 12, 11:40PM
(1 reply)
Compare between the similarity of rows
Hi All

I am trying to implement program that enable me to in a database and sort them based on the similarity degree of records.

The normal solution is based on pairwise comparison where you need to compare records against each other. This solution has very time complexity. Therefore, I am wondering if there is any other algorithms that you suggest to solving this problem in very fast and efficient way.

Thank you very much in advance and I look forward to hearing from you.
CodeCogs\′s Photo
19 Feb 12, 4:33PM
When you say database, are you using MySQL or something similar. If so then the best solution by far is to investigate the sorting options within the SQL database.

If not, then by far the best, most general sort solution is Quick Sort or from the STL library: reference:sorting/sort

The type of sort mechanism you use largely depends on the type of information you have to sort and your available memory. If you have many items you might consider Heap sort.
Currently you need to be logged in to leave a message.