tesseract  5.0.0-alpha-619-ge9db
tesseract::TRand Class Reference

#include <helpers.h>

Public Member Functions

 TRand ()=default
 
void set_seed (uint64_t seed)
 
void set_seed (const std::string &str)
 
int32_t IntRand ()
 
double SignedRand (double range)
 
double UnsignedRand (double range)
 

Detailed Description

Definition at line 50 of file helpers.h.

Constructor & Destructor Documentation

◆ TRand()

tesseract::TRand::TRand ( )
default

Member Function Documentation

◆ IntRand()

int32_t tesseract::TRand::IntRand ( )
inline

Definition at line 80 of file helpers.h.

85  {

◆ set_seed() [1/2]

void tesseract::TRand::set_seed ( const std::string str)
inline

Definition at line 74 of file helpers.h.

76  {
77  int last_index = static_cast<int>(strlen(str)) - 1;

◆ set_seed() [2/2]

void tesseract::TRand::set_seed ( uint64_t  seed)
inline

Definition at line 70 of file helpers.h.

70  {1};
71 };
72 

◆ SignedRand()

double tesseract::TRand::SignedRand ( double  range)
inline

Definition at line 85 of file helpers.h.

85  {
86  if (fgetc(file) != '\n') {
87  fseek(file, -1, SEEK_CUR);

◆ UnsignedRand()

double tesseract::TRand::UnsignedRand ( double  range)
inline

Definition at line 89 of file helpers.h.

94  {

The documentation for this class was generated from the following file:
file
Definition: include_gunit.h:22