|
Vulcan
Aerospace Engineering Utilities Built on Janus
|
Classes | |
| class | RNG |
| Vulcan Random Number Generator. More... | |
Functions | |
| template<typename RNGType> | |
| allan::IMUNoiseInput< double > | generate_imu_noise (RNGType &rng) |
| Generate IMU noise input for Allan variance model. | |
| template<typename RNGType> | |
| Eigen::Vector3d | generate_noise3 (RNGType &rng) |
| Generate 3-axis white noise. | |
| template<int N, typename RNGType> | |
| Eigen::Vector< double, N > | generate_noiseN (RNGType &rng) |
| Generate N-dimensional white noise. | |
| template<int N, typename RNGType> | |
| Eigen::Vector< double, N > | generate_correlated_noise (RNGType &rng, const Eigen::Matrix< double, N, N > &L) |
| Generate correlated noise with given Cholesky factor. | |
| template<typename RNGType> | |
| Eigen::VectorXd | generate_correlated_noise (RNGType &rng, const Eigen::MatrixXd &L) |
| Generate correlated noise for dynamic-size matrices. | |
| template<typename RNGType> | |
| void | generate_turbulence_noise (RNGType &rng, double &noise_u, double &noise_v, double &noise_w) |
| Generate turbulence forcing noise (3 independent channels). | |
| uint64_t | hardware_seed () |
| Generate seed from std::random_device. | |
| std::seed_seq | create_seed_seq (std::initializer_list< uint32_t > values) |
| Create seed sequence from multiple values. | |
| uint64_t | seed_from_string (std::string_view name) |
| Hash-based seed from string. | |
| uint64_t | stream_seed (uint64_t base_seed, uint64_t stream_index) |
| Combine base seed with stream index for parallel streams. | |
| uint64_t | advance_seed (uint64_t seed, uint64_t n) |
| Advance seed to skip N sequences. | |
|
inline |
Advance seed to skip N sequences.
Useful for checkpointing: compute the seed that would result from drawing N samples.
| seed | Current seed |
| n | Number of positions to advance |
|
inline |
Create seed sequence from multiple values.
Provides robust initialization for MT19937 which benefits from multiple seed values to initialize its large state.
| values | Initializer list of seed values |
| Eigen::Vector< double, N > vulcan::rng::generate_correlated_noise | ( | RNGType & | rng, |
| const Eigen::Matrix< double, N, N > & | L ) |
Generate correlated noise with given Cholesky factor.
For covariance matrix P, compute L = chol(P) and pass L. Returns L * w where w ~ N(0, I).
| N | Vector dimension |
| RNGType | Any type with gaussian() method |
| rng | Random number generator |
| L | Lower-triangular Cholesky factor of covariance |
| Eigen::VectorXd vulcan::rng::generate_correlated_noise | ( | RNGType & | rng, |
| const Eigen::MatrixXd & | L ) |
Generate correlated noise for dynamic-size matrices.
| RNGType | Any type with gaussian() method |
| rng | Random number generator |
| L | Lower-triangular Cholesky factor of covariance (n×n) |
| allan::IMUNoiseInput< double > vulcan::rng::generate_imu_noise | ( | RNGType & | rng | ) |
Generate IMU noise input for Allan variance model.
Fills all 18 noise channels (3 axes × 2 sensors × 3 noise types) with independent N(0,1) samples.
Example:
| RNGType | Any type with gaussian() method returning double |
| rng | Random number generator |
| Eigen::Vector3d vulcan::rng::generate_noise3 | ( | RNGType & | rng | ) |
Generate 3-axis white noise.
| RNGType | Any type with gaussian() method |
| rng | Random number generator |
| Eigen::Vector< double, N > vulcan::rng::generate_noiseN | ( | RNGType & | rng | ) |
Generate N-dimensional white noise.
| N | Vector dimension |
| RNGType | Any type with gaussian() method |
| rng | Random number generator |
| void vulcan::rng::generate_turbulence_noise | ( | RNGType & | rng, |
| double & | noise_u, | ||
| double & | noise_v, | ||
| double & | noise_w ) |
Generate turbulence forcing noise (3 independent channels).
For Dryden/von Kármán turbulence filters.
| RNGType | Any type with gaussian() method |
| rng | Random number generator |
| noise_u | Output: longitudinal noise |
| noise_v | Output: lateral noise |
| noise_w | Output: vertical noise |
|
inline |
Generate seed from std::random_device.
Use only for initial seeding. The returned seed should be logged for reproducibility in future runs.
|
inline |
Hash-based seed from string.
Useful for named simulation runs, e.g., seed_from_string("monte_carlo_run_42") Uses std::hash which provides reasonable distribution.
| name | String identifier for the simulation |
|
inline |
Combine base seed with stream index for parallel streams.
Uses golden ratio hashing for good distribution of stream seeds. Each stream will produce an independent sequence.
Example:
| base_seed | Base seed for all streams |
| stream_index | Index of this particular stream |