- 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.
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 861 of file CoinHelperFunctions.hpp.

## Constructor & Destructor Documentation

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

Default constructor.

Definition at line 867 of file CoinHelperFunctions.hpp.

References seed_.

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

Constructor wih seed.

Definition at line 870 of file CoinHelperFunctions.hpp.

References seed_.

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

Destructor.

Definition at line 875 of file CoinHelperFunctions.hpp.

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

Default constructor.

Definition at line 877 of file CoinHelperFunctions.hpp.

References seed_.

## Member Function Documentation

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

Default constructor.

Definition at line 880 of file CoinHelperFunctions.hpp.

References seed_.

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

Set seed.

Definition at line 894 of file CoinHelperFunctions.hpp.

References seed_.

Referenced by ClpModel::setRandomSeed().

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

return a random number

Definition at line 899 of file CoinHelperFunctions.hpp.

References seed_.

## Member Data Documentation

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

Current seed.

Definition at line 914 of file CoinHelperFunctions.hpp.

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

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

- /home/coin/SVN-release/Osi-0.98.1/CoinUtils/src/CoinHelperFunctions.hpp