Drake
Drake C++ Documentation
UniformDiscrete Class Referencefinal

Detailed Description

Chooses from among discrete values with equal probability.

#include <drake/common/schema/stochastic.h>

Public Member Functions

 UniformDiscrete ()
 
 UniformDiscrete (std::vector< double > values)
 
 ~UniformDiscrete () final
 
double Sample (drake::RandomGenerator *) const final
 
double Mean () const final
 
drake::symbolic::Expression ToSymbolic () const final
 
template<typename Archive >
void Serialize (Archive *a)
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 UniformDiscrete (const UniformDiscrete &)=default
 
UniformDiscreteoperator= (const UniformDiscrete &)=default
 
 UniformDiscrete (UniformDiscrete &&)=default
 
UniformDiscreteoperator= (UniformDiscrete &&)=default
 
- Public Member Functions inherited from Distribution
virtual ~Distribution ()
 

Public Attributes

std::vector< doublevalues
 

Additional Inherited Members

- Protected Member Functions inherited from Distribution
 Distribution ()
 
 Distribution (const Distribution &)=default
 
Distributionoperator= (const Distribution &)=default
 
 Distribution (Distribution &&)=default
 
Distributionoperator= (Distribution &&)=default
 

Constructor & Destructor Documentation

◆ UniformDiscrete() [1/4]

UniformDiscrete ( const UniformDiscrete )
default

◆ UniformDiscrete() [2/4]

UniformDiscrete ( UniformDiscrete &&  )
default

◆ UniformDiscrete() [3/4]

◆ UniformDiscrete() [4/4]

UniformDiscrete ( std::vector< double values)
explicit

◆ ~UniformDiscrete()

~UniformDiscrete ( )
final

Member Function Documentation

◆ Mean()

double Mean ( ) const
finalvirtual

Implements Distribution.

◆ operator=() [1/2]

UniformDiscrete& operator= ( const UniformDiscrete )
default

◆ operator=() [2/2]

UniformDiscrete& operator= ( UniformDiscrete &&  )
default

◆ Sample()

double Sample ( drake::RandomGenerator ) const
finalvirtual

Implements Distribution.

◆ Serialize()

void Serialize ( Archive *  a)

◆ ToSymbolic()

drake::symbolic::Expression ToSymbolic ( ) const
finalvirtual

Implements Distribution.

Member Data Documentation

◆ values

std::vector<double> values

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