Drake
Drake C++ Documentation
uniform_real_distribution< drake::symbolic::Expression > Class Template Reference

Detailed Description

template<>
class std::uniform_real_distribution< drake::symbolic::Expression >

Provides std::uniform_real_distribution, U(a, b), for symbolic expressions.

When operator() is called, it returns a symbolic expression a + (b - a) * v where v is a symbolic random variable associated with the standard uniform distribution.

See also
std::normal_distribution<drake::symbolic::Expression> for the internal representation of this implementation.

#include <drake/common/symbolic/expression/expression.h>

Public Types

using RealType = drake::symbolic::Expression
 
using result_type = RealType
 

Public Member Functions

 uniform_real_distribution (RealType a, RealType b=1.0)
 Constructs a new distribution object with a minimum value a and a maximum value b. More...
 
 uniform_real_distribution ()
 Constructs a new distribution object with a = 0.0 and b = 1.0. More...
 
void reset ()
 Resets the internal state of the distribution object. More...
 
result_type operator() ()
 Generates a symbolic expression representing a random value that is distributed according to the associated probability function. More...
 
template<class Generator >
result_type operator() (Generator &)
 Generates a symbolic expression representing a random value that is distributed according to the associated probability function. More...
 
RealType a () const
 Returns the minimum value a. More...
 
RealType b () const
 Returns the maximum value b. More...
 
result_type min () const
 Returns the minimum potentially generated value. More...
 
result_type max () const
 Returns the maximum potentially generated value. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 uniform_real_distribution (const uniform_real_distribution &)=default
 
uniform_real_distributionoperator= (const uniform_real_distribution &)=default
 
 uniform_real_distribution (uniform_real_distribution &&)=default
 
uniform_real_distributionoperator= (uniform_real_distribution &&)=default
 

Friends

bool operator== (const uniform_real_distribution< drake::symbolic::Expression > &lhs, const uniform_real_distribution< drake::symbolic::Expression > &rhs)
 

Member Typedef Documentation

◆ RealType

◆ result_type

Constructor & Destructor Documentation

◆ uniform_real_distribution() [1/4]

uniform_real_distribution ( RealType  a,
RealType  b = 1.0 
)
explicit

Constructs a new distribution object with a minimum value a and a maximum value b.

Exceptions
std::exceptionif a and b are constant expressions but a > b.

◆ uniform_real_distribution() [2/4]

uniform_real_distribution ( )

Constructs a new distribution object with a = 0.0 and b = 1.0.

◆ uniform_real_distribution() [3/4]

uniform_real_distribution ( const uniform_real_distribution< drake::symbolic::Expression > &  )
default

◆ uniform_real_distribution() [4/4]

uniform_real_distribution ( uniform_real_distribution< drake::symbolic::Expression > &&  )
default

Member Function Documentation

◆ a()

RealType a ( ) const

Returns the minimum value a.

◆ b()

RealType b ( ) const

Returns the maximum value b.

◆ max()

result_type max ( ) const

Returns the maximum potentially generated value.

◆ min()

result_type min ( ) const

Returns the minimum potentially generated value.

◆ operator()() [1/2]

result_type operator() ( )

Generates a symbolic expression representing a random value that is distributed according to the associated probability function.

◆ operator()() [2/2]

result_type operator() ( Generator &  )

Generates a symbolic expression representing a random value that is distributed according to the associated probability function.

Note
We provide this method, which takes a random generator, for compatibility with the std::uniform_real_distribution::operator().

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ reset()

void reset ( )

Resets the internal state of the distribution object.

Friends And Related Function Documentation

◆ operator==


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