Provides std::normal_distribution, N(μ, σ), for symbolic expressions.
When operator() is called, it returns a symbolic expression μ + σ * v
where v is a symbolic random variable associated with the standard normal (Gaussian) distribution.
It keeps a shared pointer to the vector of symbolic random variables that has been created for the following purposes:
reset()
is called, it rewinds index_
to zero so that the next operator (re)-uses the first symbolic random variable. #include <drake/common/symbolic/expression/expression.h>
Public Types | |
using | RealType = drake::symbolic::Expression |
using | result_type = RealType |
Public Member Functions | |
normal_distribution (RealType mean, RealType stddev=1.0) | |
Constructs a new distribution object with mean and stddev . More... | |
normal_distribution () | |
Constructs a new distribution object with mean = 0.0 and stddev = 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 | mean () const |
Returns the mean μ distribution parameter. More... | |
RealType | stddev () const |
Returns the deviation σ distribution parameter. More... | |
result_type | min () const |
Returns the minimum potentially generated value. More... | |
result_type | max () const |
Returns the maximum potentially generated value.o. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
normal_distribution (const normal_distribution &)=default | |
normal_distribution & | operator= (const normal_distribution &)=default |
normal_distribution (normal_distribution &&)=default | |
normal_distribution & | operator= (normal_distribution &&)=default |
Friends | |
bool | operator== (const normal_distribution< drake::symbolic::Expression > &lhs, const normal_distribution< drake::symbolic::Expression > &rhs) |
using RealType = drake::symbolic::Expression |
using result_type = RealType |
Constructs a new distribution object with mean
and stddev
.
std::exception | if stddev is a non-positive constant expression. |
normal_distribution | ( | ) |
Constructs a new distribution object with mean = 0.0 and stddev = 1.0.
|
default |
|
default |
result_type max | ( | ) | const |
Returns the maximum potentially generated value.o.
RealType mean | ( | ) | const |
Returns the mean μ distribution parameter.
result_type min | ( | ) | const |
result_type operator() | ( | ) |
Generates a symbolic expression representing a random value that is distributed according to the associated probability function.
result_type operator() | ( | Generator & | ) |
Generates a symbolic expression representing a random value that is distributed according to the associated probability function.
|
default |
|
default |
void reset | ( | ) |
Resets the internal state of the distribution object.
RealType stddev | ( | ) | const |
Returns the deviation σ distribution parameter.
|
friend |