(digit)
| 112 | sampleSize, |
| 113 | totalSamples, |
| 114 | getRandomSample(digit) { |
| 115 | if (!Number.isInteger(digit) || digit < 0 || digit > 9) return null; |
| 116 | const bucket = digitBuckets[digit]; |
| 117 | if (!bucket || bucket.length === 0) return null; |
| 118 | const randomIndex = bucket[Math.floor(Math.random() * bucket.length)]; |
| 119 | return this.getSampleByIndex(randomIndex); |
| 120 | }, |
| 121 | getSampleByIndex(index) { |
| 122 | if (!Number.isFinite(index) || index < 0 || index >= totalSamples) return null; |
| 123 | const pixels = normaliseSlice(index); |
nothing calls this directly
no outgoing calls
no test coverage detected