Class ComplexInterval

java.lang.Object
org.episteme.core.mathematics.algebra.intervals.ComplexInterval

public final class ComplexInterval extends Object
Factory and convenience class for creating rectangular regions over Complex numbers.

A "complex interval" is actually a rectangular region in the complex plane, defined by intervals on both the real and imaginary axes: [a, b] × [c, d]i represents all z = x + yi where x ∈ [a,b] and y ∈ [c,d].

These regions are useful for:

  • Complex analysis (domain specification)
  • Fractal computations (Mandelbrot/Julia sets)
  • Root finding in the complex plane
  • Contour integration bounds

* @author Silvere Martin-Michiellot
Since:
1.0
Author:
Gemini AI (Google DeepMind)
  • Method Details

    • rectangle

      public static FieldIntervalND<Real> rectangle(Real realMin, Real realMax, Real imagMin, Real imagMax)
      Creates a rectangular region in the complex plane.

      Returns all z = x + yi where x ∈ [realMin, realMax] and y ∈ [imagMin, imagMax].

      Parameters:
      realMin - minimum real part
      realMax - maximum real part
      imagMin - minimum imaginary part
      imagMax - maximum imaginary part
      Returns:
      a 2D interval representing the complex region
    • rectangle

      public static FieldIntervalND<Real> rectangle(double realMin, double realMax, double imagMin, double imagMax)
      Creates a rectangular region from double values.
    • square

      public static FieldIntervalND<Real> square(Complex center, Real halfWidth)
      Creates a square region centered at a complex number.
      Parameters:
      center - the center of the square
      halfWidth - half the side length
      Returns:
      a square region centered at the given point
    • square

      public static FieldIntervalND<Real> square(double halfWidth)
      Creates a square region centered at origin with given half-width.
    • unitSquare

      public static FieldIntervalND<Real> unitSquare()
      Creates the unit square [0, 1] × [0, 1]i.
    • mandelbrotRegion

      public static FieldIntervalND<Real> mandelbrotRegion()
      Creates the standard Mandelbrot viewing region [-2.5, 1] × [-1.5, 1.5]i.
    • contains

      public static boolean contains(Interval<Real> region, Complex z)
      Checks if a complex number is inside the region.
      Parameters:
      region - the complex region
      z - the complex number to test
      Returns:
      true if z is inside the region
    • center

      public static Complex center(Interval<Real> region)
      Returns the center of the complex region.
      Parameters:
      region - the complex region
      Returns:
      the center as a Complex number
    • width

      public static Real width(Interval<Real> region)
      Returns the width (real axis extent) of the region.
    • height

      public static Real height(Interval<Real> region)
      Returns the height (imaginary axis extent) of the region.
    • area

      public static Real area(Interval<Real> region)
      Returns the area of the complex region.
    • zoom

      public static FieldIntervalND<Real> zoom(Interval<Real> region, double factor)
      Creates a zoomed-in region centered at the same point.
      Parameters:
      region - the original region
      factor - zoom factor (> 1 zooms in, invalid input: '<' 1 zooms out)
      Returns:
      a new region with reduced dimensions
    • translate

      public static FieldIntervalND<Real> translate(Interval<Real> region, Complex delta)
      Creates a translated region.
      Parameters:
      region - the original region
      delta - the translation vector as a Complex number
      Returns:
      a new translated region