Ejemplo n.º 1
0
 private void CalculateWeightedSums()
 {
     foreach (Rating r in weightedRatings)
     {
         WeightedSum w = weightedSums.Find(
             delegate(WeightedSum wS)
         {
             return(wS.filmName == r.filmName);
         }
             );
         if (w == null)
         {
             w          = new WeightedSum();
             w.filmName = r.filmName;
             w.sum      = r.score;
             weightedSums.Add(w);
         }
         else
         {
             w.sum += r.score;
         }
     }
 }
Ejemplo n.º 2
0
 public PhotoSketchCBIR(PhotoSketchFeatureExtractor featureExtractor)
 {
     this.featureExtractor = featureExtractor;
     SearchFusionStrategy  = new WeightedSum(1, 1, 1, 1, 1, 1);
     Database = new FaceFeaturesDB();
 }