@@ -31,10 +31,10 @@ class App {
31
31
}
32
32
33
33
data class ThumbprintPair (
34
- val entity_uuid : UUID ,
35
- val center_id : Int ,
36
- val right_thumbprint_scan : FingerprintTemplate ,
37
- val left_thumbprint_scan : FingerprintTemplate
34
+ val entityUuid : UUID ,
35
+ val groupId : String ,
36
+ val rightThumbprintScan : FingerprintTemplate ,
37
+ val leftThumbprintScan : FingerprintTemplate
38
38
)
39
39
40
40
// Custom ThreadFactory to set UncaughtExceptionHandler
@@ -93,7 +93,7 @@ class Hello : CliktCommand() {
93
93
}.map {
94
94
ThumbprintPair (
95
95
UUID .fromString(it[" entity_uuid" ]),
96
- it[" center_id " ]!! .toInt() ,
96
+ it[" group_id " ]!! ,
97
97
importTemplate(Hex .decodeHex(it[" right_thumbprint_scan" ]!! )),
98
98
importTemplate(Hex .decodeHex(it[" left_thumbprint_scan" ]!! ))
99
99
)
@@ -106,13 +106,13 @@ class Hello : CliktCommand() {
106
106
candidates : List <ThumbprintPair >
107
107
): Long {
108
108
// Create matchers for left and right thumbprints
109
- val leftMatcher = FingerprintMatcher (subject.left_thumbprint_scan )
110
- val rightMatcher = FingerprintMatcher (subject.right_thumbprint_scan )
109
+ val leftMatcher = FingerprintMatcher (subject.leftThumbprintScan )
110
+ val rightMatcher = FingerprintMatcher (subject.rightThumbprintScan )
111
111
for (candidate in candidates) {
112
- val leftScore = performMatch(leftMatcher, candidate.left_thumbprint_scan )
113
- val rightScore = performMatch(rightMatcher, candidate.right_thumbprint_scan )
112
+ val leftScore = performMatch(leftMatcher, candidate.leftThumbprintScan )
113
+ val rightScore = performMatch(rightMatcher, candidate.rightThumbprintScan )
114
114
if (leftScore > outputScoreLimit || rightScore > outputScoreLimit)
115
- println (" ${subject.entity_uuid } ,${candidate.entity_uuid } ,$leftScore ,$rightScore " )
115
+ println (" ${subject.entityUuid } ,${subject.groupId} , ${ candidate.entityUuid} , ${candidate.groupId } ,$leftScore ,$rightScore " )
116
116
}
117
117
return candidates.size.toLong()
118
118
}
@@ -137,7 +137,7 @@ class Hello : CliktCommand() {
137
137
138
138
// Create a thread pool to process the matching calculations in parallel
139
139
val workerPool: ExecutorService = Executors .newFixedThreadPool(threadCount, CustomThreadFactory ())
140
- println (" subject_entity_uuid, candidate_entity_uuid,left_score,right_score" )
140
+ println (" subject_entity_uid,subject_group_id, candidate_entity_uuid,candidate_group_id ,left_score,right_score" )
141
141
val (totalMatches, matchTimeTaken) = measureTimedValue {
142
142
combinations.map { (subject, candidates) ->
143
143
workerPool.submit<Long > {
0 commit comments