MCPcopy Create free account
hub / github.com/creatale/node-dv / CircBucketFor

Function CircBucketFor

deps/tesseract/classify/intproto.cpp:449–452  ·  view source on GitHub ↗

* Returns a quantized bucket for the given circular param shifted by offset, * notionally (param + offset) * num_buckets, but modded and casted to the * appropriate type. */

Source from the content-addressed store, hash-verified

447 * appropriate type.
448 */
449uinT8 CircBucketFor(FLOAT32 param, FLOAT32 offset, int num_buckets) {
450 int bucket = IntCastRounded(MapParam(param, offset, num_buckets));
451 return static_cast<uinT8>(Modulo(bucket, num_buckets));
452} /* CircBucketFor */
453
454
455#ifndef GRAPHICS_DISABLED

Callers 2

ComputeIntFeaturesMethod · 0.85
intproto.cppFile · 0.85

Calls 2

IntCastRoundedFunction · 0.85
ModuloFunction · 0.85

Tested by

no test coverage detected