Samples
Sampling methods are provided by the QuasiMonteCarlo package.
The syntax for sampling in an interval or region is the following:
sample(n,lb,ub,S::SamplingAlgorithm)
where lb and ub are, respectively, the lower and upper bounds. There are many sampling algorithms to choose from:
- Grid sample
Missing docstring for GridSample{T}
. Check Documenter's build log for details.
Missing docstring for sample(n,lb,ub,S::GridSample)
. Check Documenter's build log for details.
- Uniform sample
Missing docstring for sample(n,lb,ub,::UniformSample)
. Check Documenter's build log for details.
- Sobol sample
Missing docstring for sample(n,lb,ub,::SobolSample)
. Check Documenter's build log for details.
- Latin Hypercube sample
Missing docstring for sample(n,lb,ub,::LatinHypercubeSample)
. Check Documenter's build log for details.
- Low Discrepancy sample
Missing docstring for LowDiscrepancySample{T}
. Check Documenter's build log for details.
Missing docstring for sample(n,lb,ub,S::LowDiscrepancySample)
. Check Documenter's build log for details.
- Sample on section
Missing docstring for SectionSample
. Check Documenter's build log for details.
Missing docstring for sample(n,lb,ub,S::SectionSample)
. Check Documenter's build log for details.
Adding a new sampling method
Adding a new sampling method is a two- step process:
- Adding a new SamplingAlgorithm type
- Overloading the sample function with the new type.
Example
struct NewAmazingSamplingAlgorithm{OPTIONAL} <: QuasiMonteCarlo.SamplingAlgorithm end
function sample(n,lb,ub,::NewAmazingSamplingAlgorithm)
if lb is Number
...
return x
else
...
return Tuple.(x)
end
end