public async Task <IEnumerable <PhotoDto> > GetPhotosByPredictionAsync(double[] prediction, int skip) { var nearestCluster = await _clusterService.GetNearestClusterAsync(prediction); var photos = await _photoRepository.GetPagedByCluster(nearestCluster, skip, _feedSize); var photosDto = Mapper.Map <IList <PhotoDto> >(photos); return(photosDto); }
public async Task <IPhoto> FindMostSimilarPhotoAsync(double[] prediction, IEnumerable <Cluster> clusters) { var cluster = await _clusterService.GetNearestClusterAsync(prediction, clusters); return(await FindMostSimilarPhotoInCluster(prediction, cluster)); }