1pub mod core;
51pub mod seq;
52pub mod slice_ops;
53
54pub mod arrays;
56pub mod distributions;
57pub mod distributions_unified;
58
59pub mod qmc;
61pub mod variance_reduction;
62
63pub mod parallel;
65pub mod secure;
66
67pub mod ml;
69pub mod prelude;
70pub mod quick;
71pub mod scientific;
72
73pub mod advanced_numerical;
75pub mod cutting_edge_mcmc;
76pub mod ecosystem_integration;
77pub mod neural_sampling;
78pub mod quantum_inspired;
79
80pub use self::core::{seeded_rng, thread_rng, DistributionExt};
83
84pub use rand_chacha::{ChaCha12Rng, ChaCha20Rng, ChaCha8Rng};
86
87pub use self::core::Random as CoreRandom;
89
90pub use slice_ops::{ScientificSliceRandom, SliceRandomExt};
92
93pub use distributions::{
100 Beta, Categorical, Dirichlet, GammaDist, MultivariateNormal, VonMises, WeightedChoice,
101};
102
103pub use distributions_unified::{
105 UnifiedBeta, UnifiedBinomial, UnifiedCauchy, UnifiedChiSquared, UnifiedDirichlet,
106 UnifiedDistribution, UnifiedDistributionError, UnifiedExp, UnifiedFisherF, UnifiedGamma,
107 UnifiedLogNormal, UnifiedNormal, UnifiedPoisson, UnifiedStudentT, UnifiedWeibull,
108};
109
110pub use arrays::{
112 random_exponential_array, random_gamma_array, random_he_weights, random_normal_array,
113 random_sparse_array, random_uniform_array, random_xavier_weights, OptimizedArrayRandom,
114};
115
116pub use variance_reduction::{
118 AntitheticSampling, CommonRatio, ControlVariate, ImportanceSplitting,
119};
120
121pub use qmc::{
123 HaltonGenerator, LatinHypercubeSampler, LowDiscrepancySequence, QmcError, SobolGenerator,
124};
125
126pub use secure::{utils as secure_utils, SecureRandom, SecureRngPool};
128
129pub use parallel::{BatchRng, DistributedRngPool, ParallelRng, ThreadLocalRngPool};
131
132pub use advanced_numerical::{
134 AdaptiveResult, AdaptiveSampler, ImportanceResult, ImportanceSampler, MLMCResult,
135 MultiLevelMonteCarlo, SequentialMonteCarlo,
136};
137
138pub use cutting_edge_mcmc::{
139 EllipticalSliceSampler, HamiltonianMonteCarlo, NoUTurnSampler, ParallelTempering,
140 SteinVariationalGradientDescent,
141};
142
143pub use neural_sampling::{
144 DiffusionConfig, EnergyBasedModel, NeuralPosteriorEstimation, NormalizingFlow,
145 ScoreBasedDiffusion,
146};
147
148pub use quantum_inspired::{
149 CoinParameters, QuantumAmplitudeAmplification, QuantumInspiredAnnealing,
150 QuantumInspiredEvolutionary, QuantumWalk,
151};
152
153pub use ecosystem_integration::{
154 AugmentationConfig, ExperimentalDesign, LinalgBridge, NeuralBridge, OptimizationBridge,
155 StatsBridge, SyntheticDataset,
156};
157
158pub use ::ndarray::Dimension;
160pub use rand::prelude as rand_prelude;
161#[allow(deprecated)]
164pub use rand::rand_core::RngCore;
165pub use rand::rngs;
166pub use rand::seq::SliceRandom;
167pub use rand::{Rng, RngExt, SeedableRng, TryRng};
168pub use rand_distr as rand_distributions;
169pub use rand_distr::uniform;
170
171pub fn random<T>() -> T
192where
193 rand::distr::StandardUniform: rand::distr::Distribution<T>,
194{
195 rand::random()
196}
197
198pub fn rng() -> rand::rngs::ThreadRng {
213 rand::rng()
214}
215
216pub use rand_distr::{
219 Alphanumeric,
221 Bernoulli as RandBernoulli,
223 Beta as RandBeta,
225 Binomial,
226 Cauchy,
227 ChiSquared,
228 Distribution,
231 Exp,
232 FisherF,
233 Gamma as RandGamma,
234 Geometric,
235 Hypergeometric,
236 InverseGaussian,
237 LogNormal,
238 Normal as RandNormal,
239 Open01,
240 OpenClosed01,
241 Pareto,
242 Pert,
243 Poisson,
244 StandardNormal,
245 StudentT,
246 Triangular,
247 Uniform as RandUniform,
248 UnitBall,
249 UnitCircle,
250 UnitDisc,
251 UnitSphere,
252 Weibull,
253 Zeta,
254 Zipf,
255};
256
257pub use rand_distr::weighted::WeightedIndex;
259
260pub use rand_distr::multi::Dirichlet as RandDirichlet;
262
263pub use rand_distr::Bernoulli;
266pub use rand_distr::Exp as Exponential; pub use rand_distr::Gamma;
268pub use rand_distr::Normal;
269pub use rand_distr::Uniform;
270
271#[cfg(feature = "random")]
273pub use ndarray_rand::RandomExt;
274
275#[cfg(not(feature = "random"))]
277pub trait RandomExt<T, D> {
278 fn random_using<R: rand::Rng>(
279 shape: D,
280 distribution: impl rand_distr::Distribution<T>,
281 rng: &mut R,
282 ) -> Self;
283}
284
285#[cfg(not(feature = "random"))]
286impl<T, D> RandomExt<T, D> for crate::ndarray::ArrayBase<crate::ndarray::OwnedRepr<T>, D>
287where
288 D: crate::ndarray::Dimension,
289{
290 fn random_using<R: rand::Rng>(
291 shape: D,
292 distribution: impl rand_distr::Distribution<T>,
293 rng: &mut R,
294 ) -> Self {
295 let size = shape.size();
296 let mut data = Vec::with_capacity(size);
297 for _ in 0..size {
298 data.push(distribution.sample(rng));
299 }
300 Self::from_shape_vec(shape, data).expect("Operation failed")
301 }
302}
303
304pub mod legacy {
306 use super::*;
307 use rand_distr::Uniform;
308
309 pub fn rng() -> Random<rand::rngs::ThreadRng> {
311 Random { rng: rand::rng() }
312 }
313
314 pub fn f64() -> f64 {
316 rand::random::<f64>()
317 }
318
319 pub fn f32() -> f32 {
321 rand::random::<f32>()
322 }
323
324 pub fn usize(range: std::ops::Range<usize>) -> usize {
326 rand::rng().random_range(range)
327 }
328}
329
330pub mod convenience {
332 use super::*;
333 use ::ndarray::{Array, Dimension, IxDyn};
334 use rand_distr::{Distribution, Normal, Uniform};
335
336 pub fn uniform() -> f64 {
338 let mut rng = thread_rng();
339 rng.sample(Uniform::new(0.0, 1.0).expect("Operation failed"))
340 }
341
342 pub fn normal() -> f64 {
344 let mut rng = thread_rng();
345 rng.sample(Normal::new(0.0, 1.0).expect("Operation failed"))
346 }
347
348 pub fn integer(min: i64, max: i64) -> i64 {
350 let mut rng = thread_rng();
351 rng.sample(Uniform::new_inclusive(min, max).expect("Operation failed"))
352 }
353
354 pub fn boolean() -> bool {
356 let mut rng = thread_rng();
357 rng.random_bool(0.5)
358 }
359
360 pub fn uniform_array<Sh: Into<IxDyn>>(shape: Sh) -> Array<f64, IxDyn> {
362 let mut rng = thread_rng();
363 let shape = shape.into();
364 let size = shape.size();
365 let values: Vec<f64> = (0..size)
366 .map(|_| rng.sample(Uniform::new(0.0, 1.0).expect("Operation failed")))
367 .collect();
368 Array::from_shape_vec(shape, values).expect("Operation failed")
369 }
370
371 pub fn normal_array<Sh: Into<IxDyn>>(shape: Sh, mean: f64, std: f64) -> Array<f64, IxDyn> {
373 let mut rng = thread_rng();
374 let shape = shape.into();
375 let size = shape.size();
376 let values: Vec<f64> = (0..size)
377 .map(|_| rng.sample(Normal::new(mean, std).expect("Operation failed")))
378 .collect();
379 Array::from_shape_vec(shape, values).expect("Operation failed")
380 }
381}
382
383pub mod sampling {
385 use super::*;
386 use ::ndarray::{Array, Dimension, IxDyn};
387 use rand_distr::{Distribution, Exp, LogNormal, Normal, Uniform};
388
389 pub fn random_uniform01<R: rand::Rng>(rng: &mut Random<R>) -> f64 {
391 rng.sample(Uniform::new(0.0, 1.0).expect("Operation failed"))
392 }
393
394 pub fn random_standard_normal<R: rand::Rng>(rng: &mut Random<R>) -> f64 {
396 rng.sample(Normal::new(0.0, 1.0).expect("Operation failed"))
397 }
398
399 pub fn random_normal<R: rand::Rng>(rng: &mut Random<R>, mean: f64, stddev: f64) -> f64 {
401 rng.sample(Normal::new(mean, stddev).expect("Operation failed"))
402 }
403
404 pub fn random_lognormal<R: rand::Rng>(rng: &mut Random<R>, mean: f64, stddev: f64) -> f64 {
406 rng.sample(LogNormal::new(mean, stddev).expect("Operation failed"))
407 }
408
409 pub fn random_exponential<R: rand::Rng>(rng: &mut Random<R>, lambda: f64) -> f64 {
411 rng.sample(Exp::new(lambda).expect("Operation failed"))
412 }
413
414 pub fn random_integers<R: rand::Rng, Sh>(
416 rng: &mut Random<R>,
417 min: i64,
418 max: i64,
419 shape: Sh,
420 ) -> Array<i64, IxDyn>
421 where
422 Sh: Into<IxDyn>,
423 {
424 rng.sample_array(
425 Uniform::new_inclusive(min, max).expect("Operation failed"),
426 shape,
427 )
428 }
429
430 pub fn random_floats<R: rand::Rng, Sh>(
432 rng: &mut Random<R>,
433 min: f64,
434 max: f64,
435 shape: Sh,
436 ) -> Array<f64, IxDyn>
437 where
438 Sh: Into<IxDyn>,
439 {
440 rng.sample_array(Uniform::new(min, max).expect("Operation failed"), shape)
441 }
442
443 pub fn bootstrap_indices<R: rand::Rng>(
445 rng: &mut Random<R>,
446 data_size: usize,
447 sample_size: usize,
448 ) -> Vec<usize> {
449 let dist = Uniform::new(0, data_size).expect("Operation failed");
450 rng.sample_vec(dist, sample_size)
451 }
452
453 pub fn sample_without_replacement<R: rand::Rng>(
455 rng: &mut Random<R>,
456 data_size: usize,
457 sample_size: usize,
458 ) -> Vec<usize> {
459 use rand::seq::SliceRandom;
460 let mut indices: Vec<usize> = (0..data_size).collect();
461 indices.shuffle(&mut rng.rng);
462 indices.truncate(sample_size);
463 indices
464 }
465}
466
467pub mod importance_sampling {
469 use super::*;
470 use rand_distr::{Normal, Uniform};
471
472 #[derive(Debug)]
474 pub struct ImportanceSampler<R: rand::Rng> {
475 rng: Random<R>,
476 }
477
478 impl<R: rand::Rng> ImportanceSampler<R> {
479 pub fn new(rng: Random<R>) -> Self {
481 Self { rng }
482 }
483
484 pub fn sample_with_weights<F, G>(
486 &mut self,
487 target_pdf: F,
488 proposal_pdf: G,
489 proposal_sampler: impl Fn(&mut Random<R>) -> f64,
490 n_samples: usize,
491 ) -> (Vec<f64>, Vec<f64>)
492 where
493 F: Fn(f64) -> f64,
494 G: Fn(f64) -> f64,
495 {
496 let mut samples = Vec::with_capacity(n_samples);
497 let mut weights = Vec::with_capacity(n_samples);
498
499 for _ in 0..n_samples {
500 let sample = proposal_sampler(&mut self.rng);
501 let weight = target_pdf(sample) / proposal_pdf(sample);
502
503 samples.push(sample);
504 weights.push(weight);
505 }
506
507 (samples, weights)
508 }
509
510 pub fn estimate_expectation<F, G, H>(
512 &mut self,
513 function: F,
514 target_pdf: G,
515 proposal_pdf: H,
516 proposal_sampler: impl Fn(&mut Random<R>) -> f64,
517 n_samples: usize,
518 ) -> f64
519 where
520 F: Fn(f64) -> f64,
521 G: Fn(f64) -> f64,
522 H: Fn(f64) -> f64,
523 {
524 let (samples, weights) =
525 self.sample_with_weights(target_pdf, proposal_pdf, proposal_sampler, n_samples);
526
527 let weighted_sum: f64 = samples
528 .iter()
529 .zip(weights.iter())
530 .map(|(&x, &w)| function(x) * w)
531 .sum();
532
533 let weight_sum: f64 = weights.iter().sum();
534
535 weighted_sum / weight_sum
536 }
537
538 pub fn adaptive_sampling<F>(
540 &mut self,
541 target_log_pdf: F,
542 initial_samples: usize,
543 adaptation_rounds: usize,
544 ) -> Vec<f64>
545 where
546 F: Fn(f64) -> f64,
547 {
548 let mut samples = Vec::new();
549 let mut proposal_mean: f64 = 0.0;
550 let mut proposal_std: f64 = 1.0;
551
552 for round in 0..adaptation_rounds {
553 let round_samples = if round == 0 {
554 initial_samples
555 } else {
556 initial_samples / 2
557 };
558 let normal_dist =
559 Normal::new(proposal_mean, proposal_std).expect("Operation failed");
560
561 let mut round_sample_vec = Vec::new();
562 let mut weights = Vec::new();
563
564 for _ in 0..round_samples {
565 let sample = self.rng.sample(normal_dist);
566
567 let normal_log_pdf = -0.5 * ((sample - proposal_mean) / proposal_std).powi(2)
569 - 0.5 * (2.0 * std::f64::consts::PI).ln()
570 - proposal_std.ln();
571 let log_weight = target_log_pdf(sample) - normal_log_pdf;
572
573 round_sample_vec.push(sample);
574 weights.push(log_weight.exp());
575 }
576
577 let weight_sum: f64 = weights.iter().sum();
579 if weight_sum > 0.0 {
580 let normalized_weights: Vec<f64> =
581 weights.iter().map(|w| w / weight_sum).collect();
582
583 proposal_mean = round_sample_vec
584 .iter()
585 .zip(normalized_weights.iter())
586 .map(|(&x, &w)| x * w)
587 .sum();
588
589 let variance = round_sample_vec
590 .iter()
591 .zip(normalized_weights.iter())
592 .map(|(&x, &w)| w * (x - proposal_mean).powi(2))
593 .sum::<f64>();
594
595 proposal_std = variance.sqrt().max(0.1); }
597
598 samples.extend(round_sample_vec);
599 }
600
601 samples
602 }
603 }
604
605 impl ImportanceSampler<rand::rngs::ThreadRng> {
606 pub fn with_default_rng() -> Self {
608 Self::new(Random::default())
609 }
610 }
611}
612
613#[cfg(feature = "gpu")]
615pub mod gpu {
616 pub struct GpuRng;
619
620 impl Default for GpuRng {
621 fn default() -> Self {
622 Self::new()
623 }
624 }
625
626 impl GpuRng {
627 pub fn new() -> Self {
628 Self
629 }
630 }
631}
632
633#[derive(Debug)]
637pub struct Random<R: rand::Rng + ?Sized = rand::rngs::ThreadRng> {
638 pub(crate) rng: R,
639}
640
641impl Default for Random<rand::rngs::ThreadRng> {
642 fn default() -> Self {
643 Self { rng: rand::rng() }
644 }
645}
646
647impl<R: rand::Rng + Clone> Clone for Random<R> {
648 fn clone(&self) -> Self {
649 Self {
650 rng: self.rng.clone(),
651 }
652 }
653}
654
655impl<R: rand::Rng> Random<R> {
656 pub fn sample<D, T>(&mut self, distribution: D) -> T
658 where
659 D: rand_distr::Distribution<T>,
660 {
661 use rand_distr::Distribution;
662 distribution.sample(&mut self.rng)
663 }
664
665 pub fn random_range_bounds<T: rand_distr::uniform::SampleUniform + PartialOrd + Copy>(
667 &mut self,
668 min: T,
669 max: T,
670 ) -> T {
671 self.sample(rand_distr::Uniform::new(min, max).expect("Operation failed"))
672 }
673
674 pub fn gen_range<T, RNG>(&mut self, range: RNG) -> T
676 where
677 T: rand_distr::uniform::SampleUniform,
678 RNG: rand_distr::uniform::SampleRange<T>,
679 {
680 rand::RngExt::random_range(&mut self.rng, range)
681 }
682
683 pub fn random_range<T, RNG>(&mut self, range: RNG) -> T
685 where
686 T: rand_distr::uniform::SampleUniform,
687 RNG: rand_distr::uniform::SampleRange<T>,
688 {
689 rand::RngExt::random_range(&mut self.rng, range)
690 }
691
692 pub fn random_f64(&mut self) -> f64 {
694 self.sample(rand_distr::Uniform::new(0.0, 1.0).expect("Operation failed"))
695 }
696
697 pub fn random_f64_raw(&mut self) -> f64 {
699 rand::RngExt::random(&mut self.rng)
700 }
701
702 pub fn random_bool(&mut self) -> bool {
704 use rand_distr::Distribution;
705 let dist = rand_distr::Bernoulli::new(0.5).expect("Operation failed");
706 dist.sample(&mut self.rng)
707 }
708
709 pub fn random_bool_with_chance(&mut self, prob: f64) -> bool {
711 use rand_distr::Distribution;
712 let dist = rand_distr::Bernoulli::new(prob).expect("Operation failed");
713 dist.sample(&mut self.rng)
714 }
715
716 pub fn shuffle<T>(&mut self, slice: &mut [T]) {
718 use rand::seq::SliceRandom;
719 slice.shuffle(&mut self.rng);
720 }
721
722 pub fn sample_vec<D, T>(&mut self, distribution: D, size: usize) -> Vec<T>
724 where
725 D: rand_distr::Distribution<T> + Copy,
726 {
727 (0..size)
728 .map(|_| distribution.sample(&mut self.rng))
729 .collect()
730 }
731
732 pub fn sample_array<D, T, Sh>(
734 &mut self,
735 distribution: D,
736 shape: Sh,
737 ) -> crate::ndarray::Array<T, crate::ndarray::IxDyn>
738 where
739 D: rand_distr::Distribution<T> + Copy,
740 Sh: Into<crate::ndarray::IxDyn>,
741 {
742 let shape = shape.into();
743 let size = shape.size();
744 let values = self.sample_vec(distribution, size);
745 crate::ndarray::Array::from_shape_vec(shape, values).expect("Operation failed")
746 }
747}
748
749impl Random<rand::rngs::ThreadRng> {
750 pub fn seed(seed: u64) -> Random<rand::rngs::StdRng> {
752 Random {
753 rng: rand::SeedableRng::seed_from_u64(seed),
754 }
755 }
756}
757
758impl<R: rand::Rng> rand::TryRng for Random<R> {
761 type Error = std::convert::Infallible;
762
763 fn try_next_u32(&mut self) -> Result<u32, Self::Error> {
764 Ok(self.rng.next_u32())
765 }
766
767 fn try_next_u64(&mut self) -> Result<u64, Self::Error> {
768 Ok(self.rng.next_u64())
769 }
770
771 fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Self::Error> {
772 self.rng.fill_bytes(dest);
773 Ok(())
774 }
775}
776
777impl rand::SeedableRng for Random<rand::rngs::StdRng> {
778 type Seed = <rand::rngs::StdRng as rand::SeedableRng>::Seed;
779
780 fn from_seed(seed: Self::Seed) -> Self {
781 Random {
782 rng: rand::rngs::StdRng::from_seed(seed),
783 }
784 }
785
786 fn seed_from_u64(state: u64) -> Self {
787 Random {
788 rng: rand::rngs::StdRng::seed_from_u64(state),
789 }
790 }
791}
792
793use std::cell::RefCell;
795thread_local! {
796 static THREAD_RNG: RefCell<Random> = RefCell::new(Random::default());
797}
798
799#[allow(dead_code)]
801pub fn get_rng<F, R>(f: F) -> R
802where
803 F: FnOnce(&mut Random) -> R,
804{
805 THREAD_RNG.with(|rng| f(&mut rng.borrow_mut()))
806}
807
808pub struct DeterministicSequence {
810 seed: u64,
811 counter: u64,
812}
813
814impl DeterministicSequence {
815 pub fn seed(seed: u64) -> Self {
817 Self { seed, counter: 0 }
818 }
819
820 pub fn next_f64(&mut self) -> f64 {
822 let mut x = self.counter.wrapping_add(self.seed);
824 x = ((x >> 16) ^ x).wrapping_mul(0x45d9f3b);
825 x = ((x >> 16) ^ x).wrapping_mul(0x45d9f3b);
826 x = (x >> 16) ^ x;
827
828 self.counter = self.counter.wrapping_add(1);
829
830 (x as f64) / (u64::MAX as f64)
832 }
833
834 pub fn reset(&mut self) {
836 self.counter = 0;
837 }
838
839 pub fn get_vec(&mut self, size: usize) -> Vec<f64> {
841 (0..size).map(|_| self.next_f64()).collect()
842 }
843
844 pub fn get_array<Sh>(&mut self, shape: Sh) -> crate::ndarray::Array<f64, crate::ndarray::IxDyn>
846 where
847 Sh: Into<crate::ndarray::IxDyn>,
848 {
849 let shape = shape.into();
850 let size = shape.size();
851 let values = self.get_vec(size);
852 crate::ndarray::Array::from_shape_vec(shape, values).expect("Operation failed")
853 }
854}
855
856pub type ThreadRng = Random<rand::rngs::ThreadRng>;
862pub type StdRng = Random<rand::rngs::StdRng>;
863
864pub type UniformDist = rand_distributions::Uniform<f64>;
866pub type NormalDist = rand_distributions::Normal<f64>;
867pub type ExponentialDist = rand_distributions::Exp<f64>;
868
869pub type Array1D<T> = crate::ndarray::Array1<T>;
871pub type Array2D<T> = crate::ndarray::Array2<T>;
872pub type Array3D<T> = crate::ndarray::Array3<T>;
873
874pub use quick as rapid;
880
881pub use scientific as research;
883
884pub use ml as machine_learning;
886
887pub use secure as crypto;
889
890pub mod quasi_monte_carlo {
896 pub use crate::random::qmc::*;
897
898 pub type SobolSequence = crate::random::qmc::SobolGenerator;
900 pub type HaltonSequence = crate::random::qmc::HaltonGenerator;
901 pub type LatinHypercubeSampling = crate::random::qmc::LatinHypercubeSampler;
902}
903
904pub mod specialized_distributions {
906 pub use crate::random::distributions::*;
907}
908
909pub mod optimized_arrays {
911 pub use crate::random::arrays::*;
912}
913
914pub mod slice_random {
916 pub use crate::random::slice_ops::convenience::*;
917}
918
919pub mod essentials {
925 pub use crate::random::rand_distributions::{Normal, Uniform};
926 pub use crate::random::{
927 random_normal_array, random_uniform_array, seeded_rng, thread_rng, Beta, Categorical,
928 Random, Rng, SeedableRng, WeightedChoice,
929 };
930}
931
932pub mod statistics {
934 pub use crate::random::{
935 AntitheticSampling, Beta, Categorical, CommonRatio, ControlVariate, Dirichlet,
936 ExponentialDist, GammaDist, HaltonGenerator, LatinHypercubeSampler, MultivariateNormal,
937 SobolGenerator, VonMises, WeightedChoice,
938 };
939}
940
941pub mod hpc {
943 pub use crate::random::{
944 random_he_weights, random_normal_array, random_uniform_array, random_xavier_weights,
945 BatchRng, DistributedRngPool, OptimizedArrayRandom, ParallelRng, ThreadLocalRngPool,
946 };
947}
948
949pub mod cutting_edge {
951 pub use crate::random::{
952 advanced_numerical::*, cutting_edge_mcmc::*, ecosystem_integration::*, neural_sampling::*,
953 quantum_inspired::*,
954 };
955}
956
957pub mod bayesian {
959 pub use crate::random::{
960 EllipticalSliceSampler, HamiltonianMonteCarlo, ImportanceSampler, NoUTurnSampler,
961 ParallelTempering, SteinVariationalGradientDescent,
962 };
963 }
965
966pub mod ai_sampling {
968 pub use crate::random::{
969 DiffusionConfig, EnergyBasedModel, NeuralBridge, NeuralPosteriorEstimation,
970 NormalizingFlow, ScoreBasedDiffusion,
971 };
972}
973
974pub mod quantum {
976 pub use crate::random::{
977 CoinParameters, QuantumAmplitudeAmplification, QuantumInspiredAnnealing,
978 QuantumInspiredEvolutionary, QuantumWalk,
979 };
980}
981
982pub mod numerical_methods {
984 pub use crate::random::{
985 AdaptiveResult, AdaptiveSampler, ImportanceResult, MLMCResult, MultiLevelMonteCarlo,
986 SequentialMonteCarlo,
987 };
988}
989
990pub mod bridges {
992 pub use crate::random::{
993 AugmentationConfig, ExperimentalDesign, LinalgBridge, NeuralBridge, OptimizationBridge,
994 StatsBridge, SyntheticDataset,
995 };
996}