summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJames O'Leary <jamesoleary@google.com>2021-03-11 11:27:38 -0500
committerJames O'Leary <jamesoleary@google.com>2021-03-11 12:30:12 -0500
commit2a75b45bff598ca0e5df868fb2474365f2c883b4 (patch)
tree3bc6a6cc14558c041310914c81001c345dc995e6 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentccc3f976026245eb8250f3b48f524d79ee665585 (diff)
Fix initializing clusters with random randoms
During the quantization process, an instance of a Quantizer is created. When quantization is run, the Quantizer may need to create starting points that are random. To keep results stable, meaning multiple runs of a quantizer output the same results, those starting points must be created using a Random with the same starting seed. Without specifying a starting seed, or if an instance of Random is reused across runs, the random starting points will vary across quantizer runs. With this patch, the Random used to create starting points is no longer used across multiple runs (i.e. it isn't a static variable anymore). Additionally, a starting seed is specified. Test: Add log dumps after the quantization process. Verify that results from Kmeans remain consistent as long as the input is consistent. Bug: 182333325 Change-Id: Ia0f984349b7885ae1b44536aaa1b286a28e50587
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions