Class Complex128UniformRect

java.lang.Object
org.flag4j.rng.distributions.Distribution<Complex128,RandomComplex>
org.flag4j.rng.distributions.Complex128UniformRect

public class Complex128UniformRect extends Distribution<Complex128,RandomComplex>

A rectangular uniform distribution on the complex plane.

A rectangular uniform distribution on the complex plane is equivalent to combining two 1D uniform distributions over the real and imaginary axes: \(\mathcal{U}(a, b) \) and \(\mathcal{U}(c, d) \) respectively.

The PDF of the joint distribution of the real component \( x \sim \mathcal{U}(a, b) \) and the complex component \( y \sim \mathcal{U}(c, d) \) for a complex value \( z = x + iy \) is given by: \[ f(z) = \begin{cases} \frac{1}{(b - a)(d - c)} & \text{for } \Re(z) \in [a, b), \Im(z) \in [c, d) \\ 0 & \text{otherwise}. \end{cases} \]

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Upper bound, \( d \), of the imaginary component of the uniform distribution (exclusive).
    final double
    Upper bound, \( b \), of the real component of the uniform distribution (exclusive).
    final double
    Lower bound, \( c \), of the imaginary component of the uniform distribution (inclusive).
    final double
    Lower bound, \( a \), of the real component of the uniform distribution (inclusive).

    Fields inherited from class org.flag4j.rng.distributions.Distribution

    rng
  • Constructor Summary

    Constructors
    Constructor
    Description
    Complex128UniformRect(RandomComplex rng, double minRe, double maxRe, double minIm, double maxIm)
    Constructs a complex rectangular uniform distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    Randomly samples this complex rectangular uniform distribution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • minRe

      public final double minRe
      Lower bound, \( a \), of the real component of the uniform distribution (inclusive).
    • maxRe

      public final double maxRe
      Upper bound, \( b \), of the real component of the uniform distribution (exclusive).
    • minIm

      public final double minIm
      Lower bound, \( c \), of the imaginary component of the uniform distribution (inclusive).
    • maxIm

      public final double maxIm
      Upper bound, \( d \), of the imaginary component of the uniform distribution (exclusive).
  • Constructor Details

    • Complex128UniformRect

      public Complex128UniformRect(RandomComplex rng, double minRe, double maxRe, double minIm, double maxIm)
      Constructs a complex rectangular uniform distribution.
      Parameters:
      rng - Pseudorandom number generator to use when randomly sampling from this distribution.
      minRe - Lower bound of the real component of the uniform distribution (inclusive).
      maxRe - Upper bound of the real component of the uniform distribution (exclusive).
      minIm - Lower bound of the imaginary component of the uniform distribution (inclusive).
      maxIm - Upper bound of the imaginary component of the uniform distribution (exclusive).
  • Method Details

    • sample

      public Complex128 sample()
      Randomly samples this complex rectangular uniform distribution.
      Specified by:
      sample in class Distribution<Complex128,RandomComplex>
      Returns:
      A random value distributed according to this complex rectangular uniform distribution.