[mob][photos] Remove redundant clustering code
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user