Пример #1
0
 /** 按照作者评分 */
 private void pfByZuozhe(AboutBook comBooks, ArrayList<AboutBook> abBooks) {
   for (Iterator iterator = abBooks.iterator(); iterator.hasNext(); ) {
     AboutBook aboutBook = (AboutBook) iterator.next();
     // #########################可以在此更改权重
     aboutBook.fenshu = aboutBook.fenshu + ld.compare(comBooks.getZuozhe(), aboutBook.getZuozhe());
   }
 }
Пример #2
0
 /** 按照isbn评分 */
 private void pfByIsbn(AboutBook comBooks, ArrayList<AboutBook> abBooks) {
   for (Iterator iterator = abBooks.iterator(); iterator.hasNext(); ) {
     AboutBook aboutBook = (AboutBook) iterator.next();
     // #########################可以在此更改权重
     double re = ld.compare(comBooks.getIsbn(), aboutBook.getIsbn());
     if (re >= 1) re = re * 100;
     aboutBook.fenshu = aboutBook.fenshu + re;
   }
 }