---
name: "std::uniform_real"
section: "3"
platform: "linux"
package: "libstdc++6-4.3-doc"
version: "4.3.2-1.1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/std::uniform_real"
---

# std::uniform\_real(3)

## NAME

std::uniform\_real -

## SYNOPSIS

## Detailed Description

### template\<typename \_RealType = double\> class std::uniform\_real\< \_RealType \>

Uniform continuous distribution for random numbers.

A continuous random distribution on the range \[min, max) with equal probability throughout the range. The URNG should be real-valued and deliver number in the range \[0, 1).

Definition at line 1999 of file tr1\_impl/random.

### Public Types

typedef \_RealType **input\_type**\
 typedef \_RealType **result\_type**\

### Public Member Functions

result\_type **max** () const \
 result\_type **min** () const \
 template\<class \_UniformRandomNumberGenerator\> result\_type **operator()** (\_UniformRandomNumberGenerator &\_\_urng)\
 void **reset** ()\
 **uniform\_real** (\_RealType \_\_min=\_RealType(0), \_RealType \_\_max=\_RealType(1))\

### Friends

template\<typename \_RealType1, typename \_CharT, typename \_Traits\> **std::basic\_ostream**\< \_CharT, \_Traits \> & **operator\<\<** (**std::basic\_ostream**\< \_CharT, \_Traits \> &\_\_os, const **uniform\_real**\< \_RealType1 \> &\_\_x)\
 template\<typename \_RealType1, typename \_CharT, typename \_Traits\> **std::basic\_istream**\< \_CharT, \_Traits \> & **operator\>\>** (**std::basic\_istream**\< \_CharT, \_Traits \> &\_\_is, **uniform\_real**\< \_RealType1 \> &\_\_x)\

## Constructor & Destructor Documentation

### template\<typename \_RealType = double\> std::uniform\_real\< \_RealType \>::uniform\_real (\_RealType \_\_min = `_RealType(0)`, \_RealType \_\_max = `_RealType(1)`)` [inline, explicit]`

Constructs a **uniform\_real** object.

**Parameters:**

*\_\_min* \[IN\] The lower bound of the distribution. \
 *\_\_max* \[IN\] The upper bound of the distribution.

Definition at line 2014 of file tr1\_impl/random.

## Friends And Related Function Documentation

### template\<typename \_RealType = double\> template\<typename \_RealType1, typename \_CharT, typename \_Traits\> std::basic\_ostream\<\_CharT, \_Traits\>& operator\<\< (std::basic\_ostream\< \_CharT, \_Traits \> & \_\_os, const uniform\_real\< \_RealType1 \> & \_\_x)` [friend]`

Inserts a uniform\_real random number distribution `__x` into the output stream `__os`.

**Parameters:**

*\_\_os* An output stream. \
 *\_\_x* A uniform\_real random number distribution.

**Returns:**

The output stream with the state of `__x` inserted or in an error state.

### template\<typename \_RealType = double\> template\<typename \_RealType1, typename \_CharT, typename \_Traits\> std::basic\_istream\<\_CharT, \_Traits\>& operator\>\> (std::basic\_istream\< \_CharT, \_Traits \> & \_\_is, uniform\_real\< \_RealType1 \> & \_\_x)` [friend]`

Extracts a uniform\_real random number distribution `__x` from the input stream `__is`.

**Parameters:**

*\_\_is* An input stream. \
 *\_\_x* A uniform\_real random number generator engine.

**Returns:**

The input stream with `__x` extracted or in an error state.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
