Vote count:
0
Consider 3 ordered lists of objects X1 : Sorted on attribute A X2 : Sorted on attribute B
Home : Union of X1 and X2 with following properties
pick top N items of X1 and top N of X2 items. Sort the 2N items on Attribute C which is common to X1 and X2 but different from A and B.
return top N items from 2N items.
Do this continuously till all items in X1 and X2 are exhausted. So the result is partially ordered Lists of size N each.
What is the best way to implement this assuming it needs to be extended to several X items and different values of N.
More explanation: This is a common problem probably faced by Social network homefeeds. You want to rank your homefeed based on recency yet show posts from your close friends a bit on top.
Consider posts from your close friends (X1) consider posts from the pages you liked (X2). X1 is sorted on timestamp. X2 is sorted on like counts.
Implementing a partial ordering in Java
Aucun commentaire:
Enregistrer un commentaire