Class Complex128UniformDisk
A uniform distribution over an annulus (i.e. washer) on the complex plane.
A uniform distribution over an annulus is defined over the region between two concentric circles with inner radius \( r_{\text{inner}} \) and outer radius \( r_{\text{outer}} \) and centered at \( \left(x, y\right) \).
A complex number \( z = x + yi + re^{i\theta } \) is sampled from this distribution by drawing its modulus \( r \) from a uniform distribution \( \mathcal{U}\left(r_{\text{inner}}, r_{\text{outer}}\right) \) and its argument \( \theta \) from a uniform distribution \( \mathcal{U}(0, 2\pi) \).
The PDF of the joint distribution for a complex value \( z = x + yi + re^{i\theta } \) is given by: \[ f(z) = \begin{cases} \dfrac{1}{\pi \left(r_{\text{outer}}^2 - r_{\text{inner}}^2\right)} & \text{for } r_{\text{inner}} \leq |z - (x + yi)| < r_{\text{outer}} \\ 0 & \text{otherwise}. \end{cases} \]
This distribution ensures that points are uniformly distributed in within the annulus, meaning that the density function accounts for the increasing circumference as \( r \) increases avoiding "bunching" of points close to the inner radius.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double
Imaginary value of the center, y, of the annulus in the complex plane.final double
Real value of the center, x, of the annulus in the complex plane.final double
Outer radius, router , of the annulus (exclusive).final double
Inner radius, rinner , of the annulus (inclusive).Fields inherited from class org.flag4j.rng.distributions.Distribution
rng
-
Constructor Summary
ConstructorsConstructorDescriptionComplex128UniformDisk
(RandomComplex rng, double min, double max) Constructs a complex annular uniform distribution centered at the origin of the complex plane.Complex128UniformDisk
(RandomComplex rng, double min, double max, double centerRe, double centerIm) Constructs a complex annular uniform distribution with specified center on the complex plane. -
Method Summary
-
Field Details
-
min
public final double minInner radius, rinner , of the annulus (inclusive). -
max
public final double maxOuter radius, router , of the annulus (exclusive). -
centerRe
public final double centerReReal value of the center, x, of the annulus in the complex plane. -
centerIm
public final double centerImImaginary value of the center, y, of the annulus in the complex plane.
-
-
Constructor Details
-
Complex128UniformDisk
Constructs a complex annular uniform distribution centered at the origin of the complex plane. To specify the distribution as a disk, setmin=0.0
.- Parameters:
rng
- Pseudorandom number generator to use when randomly sampling from this distribution.min
- Inner radius of the annulus (inclusive).max
- Outer radius of the annulus (exclusive).
-
Complex128UniformDisk
public Complex128UniformDisk(RandomComplex rng, double min, double max, double centerRe, double centerIm) Constructs a complex annular uniform distribution with specified center on the complex plane. To specify the distribution as a disk, setmin=0.0
.- Parameters:
rng
- Pseudorandom number generator to use when randomly sampling from this distribution.min
- Inner radius of the annulus (inclusive).max
- Outer radius of the annulus (exclusive).centerRe
- Real value of the center of the annulus in the complex plane.centerIm
- Imaginary value of the center of the annulus in the complex plane.
-
-
Method Details
-
sample
Randomly samples this complex annular uniform distribution centered at (centerRe
,centerIm
) with inner and outer radiusmin
andmax
respectively.- Specified by:
sample
in classDistribution<Complex128,
RandomComplex> - Returns:
- A random value distributed according to this complex annular uniform distribution.
-