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

## Constructor & Destructor Documentation

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

Default constructor.

Definition at line 892 of file CoinHelperFunctions.hpp.

References seed_.

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

Constructor wih seed.

Definition at line 895 of file CoinHelperFunctions.hpp.

References seed_.

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

Destructor.

Definition at line 900 of file CoinHelperFunctions.hpp.

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

Default constructor.

Definition at line 902 of file CoinHelperFunctions.hpp.

References seed_.

## Member Function Documentation

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

Default constructor.

Definition at line 905 of file CoinHelperFunctions.hpp.

References seed_.

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

Set seed.

Definition at line 919 of file CoinHelperFunctions.hpp.

References seed_.

Referenced by ClpModel::setRandomSeed().

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

return a random number

Definition at line 924 of file CoinHelperFunctions.hpp.

References seed_.

## Member Data Documentation

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

Current seed.

Definition at line 939 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/Bcps-0.91.0/CoinUtils/src/CoinHelperFunctions.hpp