Exemplo n.º 1
0
 @Override
 public double calculateSimiliraty(T item1, T item2, Collection<Property> ps) {
   List<Double> vector1 = new ArrayList<Double>();
   List<Double> vector2 = new ArrayList<Double>();
   for (Property property : ps) {
     setFragmentsGroup(item1, item2, property);
     vector1.addAll(acceptProperty(item1, property));
     vector2.addAll(acceptProperty(item2, property));
   }
   return calculateSimilarity(vector1, vector2);
 }