Drake
RandomState< Distribution, Generator > Class Template Reference

State for a given random distribution and generator. More...

#include <drake/systems/primitives/random_source.h>

Public Types

typedef Generator::result_type Seed
 

Public Member Functions

 RandomState (Seed seed)
 
double GetNextValue ()
 Generate the next random value with the given distribution. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 RandomState (const RandomState &)=default
 
RandomStateoperator= (const RandomState &)=default
 
 RandomState (RandomState &&)=default
 
RandomStateoperator= (RandomState &&)=default
 

Detailed Description

template<typename Distribution, typename Generator = std::mt19937>
class drake::systems::internal::RandomState< Distribution, Generator >

State for a given random distribution and generator.

This owns both the distribution and the generator.

Member Typedef Documentation

◆ Seed

typedef Generator::result_type Seed

Constructor & Destructor Documentation

◆ RandomState() [1/3]

RandomState ( const RandomState< Distribution, Generator > &  )
default

◆ RandomState() [2/3]

RandomState ( RandomState< Distribution, Generator > &&  )
default

◆ RandomState() [3/3]

RandomState ( Seed  seed)
inlineexplicit

Member Function Documentation

◆ GetNextValue()

double GetNextValue ( )
inline

Generate the next random value with the given distribution.

◆ operator=() [1/2]

RandomState& operator= ( const RandomState< Distribution, Generator > &  )
default

◆ operator=() [2/2]

RandomState& operator= ( RandomState< Distribution, Generator > &&  )
default

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