[mob][photos] Remove redundant clustering code

This commit is contained in:
laurenspriem
2024-06-19 17:46:25 +05:30
parent 0c790e64f8
commit 6954c960d8
2 changed files with 0 additions and 30 deletions

View File

@@ -1,22 +0,0 @@
import "package:photos/face/model/person.dart";
enum MappingSource {
local,
remote,
}
class ClustersMapping {
final Map<int, Set<int>> fileIDToClusterIDs;
final Map<int, String> clusterToPersonID;
// personIDToPerson is a map of personID to PersonEntity, and it's same for
// both local and remote sources
final Map<String, PersonEntity> personIDToPerson;
final MappingSource source;
ClustersMapping({
required this.fileIDToClusterIDs,
required this.clusterToPersonID,
required this.personIDToPerson,
required this.source,
});
}

View File

@@ -67,11 +67,3 @@ double cosineDistForNormVectors(List<double> vector1, List<double> vector2) {
}
return 1.0 - dotProduct;
}
double calculateSqrDistance(List<double> v1, List<double> v2) {
double sum = 0;
for (int i = 0; i < v1.length; i++) {
sum += (v1[i] - v2[i]) * (v1[i] - v2[i]);
}
return sqrt(sum);
}