# CoinThreadRandom Class Reference

Class for thread specific random numbers. More...

`#include <CoinHelperFunctions.hpp>`

Collaboration diagram for CoinThreadRandom:
[legend]

List of all members.

## Public Member Functions
Constructors, destructor
| CoinThreadRandom ()
| Default constructor.
| CoinThreadRandom (int seed)
| Constructor wih seed.
| ~CoinThreadRandom ()
| Destructor.
| CoinThreadRandom (const CoinThreadRandom &rhs)
CoinThreadRandom & | operator= (const CoinThreadRandom &rhs)
Sets/gets
void | setSeed (int seed)
| Set seed.
unsigned int | getSeed () const
| Get seed.
double | randomDouble () const
| return a random number
void | randomize (int n=0)
| make more random (i.e. for startup)
## Protected Attributes
Data members
The data members are protected to allow access for derived classes.
unsigned int | seed_
| Current seed.

## Detailed Description

Class for thread specific random numbers.

Definition at line 951 of file CoinHelperFunctions.hpp.

## Constructor & Destructor Documentation

CoinThreadRandom::CoinThreadRandom | ( |  | ) | `[inline]`

Default constructor.

Definition at line 957 of file CoinHelperFunctions.hpp.

CoinThreadRandom::CoinThreadRandom | ( | int | seed | ) | `[inline]`

Constructor wih seed.

Definition at line 960 of file CoinHelperFunctions.hpp.

CoinThreadRandom::~CoinThreadRandom | ( |  | ) | `[inline]`

Destructor.

Definition at line 965 of file CoinHelperFunctions.hpp.

CoinThreadRandom::CoinThreadRandom | ( | const CoinThreadRandom & | rhs | ) | `[inline]`

Definition at line 967 of file CoinHelperFunctions.hpp.

## Member Function Documentation

CoinThreadRandom& CoinThreadRandom::operator= | ( | const CoinThreadRandom & | rhs | ) | `[inline]`

Definition at line 970 of file CoinHelperFunctions.hpp.

void CoinThreadRandom::setSeed | ( | int | seed | ) | `[inline]`

Set seed.

Definition at line 984 of file CoinHelperFunctions.hpp.

unsigned int CoinThreadRandom::getSeed | ( |  | ) | const`[inline]`

Get seed.

Definition at line 989 of file CoinHelperFunctions.hpp.

double CoinThreadRandom::randomDouble | ( |  | ) | const`[inline]`

return a random number

Definition at line 994 of file CoinHelperFunctions.hpp.

void CoinThreadRandom::randomize | ( | int | n = `0` | ) | `[inline]`

make more random (i.e. for startup)

Definition at line 1002 of file CoinHelperFunctions.hpp.

## Member Data Documentation

unsigned int CoinThreadRandom::seed_`[mutable, protected]`

Current seed.

Definition at line 1017 of file CoinHelperFunctions.hpp.

The documentation for this class was generated from the following file:

- /home/coin/svn-release/CoinUtils-2.9.4/CoinUtils/src/CoinHelperFunctions.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines