#include <helpers.h>
Definition at line 42 of file helpers.h.
◆ TRand()
tesseract::TRand::TRand |
( |
| ) |
|
|
inline |
◆ IntRand()
int32_t tesseract::TRand::IntRand |
( |
| ) |
|
|
inline |
◆ set_seed() [1/2]
void tesseract::TRand::set_seed |
( |
uint64_t |
seed | ) |
|
|
inline |
◆ set_seed() [2/2]
void tesseract::TRand::set_seed |
( |
const std::string & |
str | ) |
|
|
inline |
Definition at line 50 of file helpers.h.
51 std::hash<std::string> hasher;
52 set_seed(static_cast<uint64_t>(hasher(str)));
void set_seed(uint64_t seed)
◆ SignedRand()
double tesseract::TRand::SignedRand |
( |
double |
range | ) |
|
|
inline |
Definition at line 61 of file helpers.h.
62 return range * 2.0 *
IntRand() / INT32_MAX - range;
◆ UnsignedRand()
double tesseract::TRand::UnsignedRand |
( |
double |
range | ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /usr/src/tesseract-ocr.master/src/ccutil/helpers.h