- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# CoinThreadRandom Class Reference

Class for thread specific random numbers. More...

`#include <CoinHelperFunctions.hpp>`

List of all members.

## Public Member Functions
Constructors, destructor
| CoinThreadRandom ()
| Default constructor.
| CoinThreadRandom (int seed)
| Constructor wih seed.
| ~CoinThreadRandom ()
| Destructor.
| CoinThreadRandom (const CoinThreadRandom &rhs)
| Default constructor.
CoinThreadRandom & | operator= (const CoinThreadRandom &rhs)
| Default constructor.
Sets/gets
void | setSeed (int seed)
| Set seed.
unsigned int | getSeed () const
| Get seed.
double | randomDouble () const
| return a random number
## 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 913 of file CoinHelperFunctions.hpp.

## Constructor & Destructor Documentation

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

Default constructor.

Definition at line 919 of file CoinHelperFunctions.hpp.

References seed_.

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

Constructor wih seed.

Definition at line 922 of file CoinHelperFunctions.hpp.

References seed_.

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

Destructor.

Definition at line 927 of file CoinHelperFunctions.hpp.

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

Default constructor.

Definition at line 929 of file CoinHelperFunctions.hpp.

References seed_.

## Member Function Documentation

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

Default constructor.

Definition at line 932 of file CoinHelperFunctions.hpp.

References seed_.

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

Set seed.

Definition at line 946 of file CoinHelperFunctions.hpp.

References seed_.

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

Get seed.

Definition at line 951 of file CoinHelperFunctions.hpp.

References seed_.

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

return a random number

Definition at line 956 of file CoinHelperFunctions.hpp.

References seed_.

## Member Data Documentation

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

Current seed.

Definition at line 971 of file CoinHelperFunctions.hpp.

Referenced by CoinThreadRandom(), getSeed(), operator=(), randomDouble(), and setSeed().

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

- /home/coin/SVN-release/CoinUtils-2.6.1/CoinUtils/src/CoinHelperFunctions.hpp