Aikido
RNG.hpp File Reference
#include <cassert>
#include <cmath>
#include <cstdint>
#include <memory>
#include <random>
#include <Eigen/Geometry>
#include "aikido/common/pointers.hpp"
#include "detail/RNG-impl.hpp"

Go to the source code of this file.

Classes

class  aikido::common::RNG
 Implementation of the C++11 "random engine" concept that uses virtual function calls to erase the type of the underlying random engine. More...
 
class  aikido::common::RNGWrapper< T >
 Concrete implementation of the RNG type erasure class. More...
 

Namespaces

 aikido
 Format of serialized trajectory in YAML.
 
 aikido::common
 

Typedefs

using aikido::common::RNGPtr = std::shared_ptr< RNG >
 
using aikido::common::ConstRNGPtr = std::shared_ptr< const RNG >
 
using aikido::common::WeakRNGPtr = std::weak_ptr< RNG >
 
using aikido::common::WeakConstRNGPtr = std::weak_ptr< const RNG >
 
using aikido::common::UniqueRNGPtr = std::unique_ptr< RNG >
 
using aikido::common::UniqueConstRNGPtr = std::unique_ptr< const RNG >
 

Functions

template<class Engine , class Scalar , class Quaternion >
Quaternion aikido::common::sampleQuaternion (Engine &_engine, std::uniform_real_distribution< Scalar > &_distribution)
 Sample a unit quaternion uniformly at random. More...
 
std::vector< std::unique_ptr< common::RNG > > aikido::common::cloneRNGsFrom (RNG &_engine, std::size_t _numOutputs, std::size_t _numSeeds=NUM_DEFAULT_SEEDS)
 Deterministically create different _numOutputs random number generators of the same type as the input _engine. More...
 
std::vector< std::unique_ptr< common::RNG > > aikido::common::cloneRNGFrom (RNG &_engine, std::size_t _numSeeds=NUM_DEFAULT_SEEDS)
 Deterministically create a random number generator of the same type as the input _engine. More...
 

Variables

constexpr int aikido::common::NUM_DEFAULT_SEEDS {100}
 Default number of seeds to by cloneRNGsFrom to seed new engines. More...