Class IntervalND

java.lang.Object
org.episteme.core.mathematics.algebra.intervals.IntervalND
All Implemented Interfaces:
Set<List<Real>>, TopologicalSpace<List<Real>>

public class IntervalND extends Object implements TopologicalSpace<List<Real>>
Represents an N-dimensional interval (hyperrectangle) over Real numbers.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • IntervalND

      public IntervalND(FieldIntervalND<Real> backing)
      Creates an N-dimensional interval from a backing FieldIntervalND.
    • IntervalND

      public IntervalND(List<Real> min, List<Real> max)
      Creates an N-dimensional interval from min and max points.
      Parameters:
      min - the minimum point (lower corner)
      max - the maximum point (upper corner)
    • IntervalND

      public IntervalND(Real[] min, Real[] max)
      Creates an N-dimensional interval from Real arrays.
  • Method Details

    • dimension

      public int dimension()
      Gets the number of dimensions.
    • getMin

      public Real getMin(int dim)
      Gets the minimum value for a specific dimension.
    • getMax

      public Real getMax(int dim)
      Gets the maximum value for a specific dimension.
    • getMinPoint

      public List<Real> getMinPoint()
      Gets the minimum point (lower corner).
    • getMaxPoint

      public List<Real> getMaxPoint()
      Gets the maximum point (upper corner).
    • getWidth

      public Real getWidth(int dim)
      Gets the width in a specific dimension.
    • getMidpoint

      public Real getMidpoint(int dim)
      Gets the midpoint in a specific dimension.
    • getBacking

      public FieldIntervalND<Real> getBacking()
      Gets the backing FieldIntervalND.
    • contains

      public boolean contains(List<Real> point)
      Description copied from interface: Set
      Tests whether this set contains the specified element.

      This is the fundamental operation of a set - membership testing.

      Specified by:
      contains in interface Set<List<Real>>
      Parameters:
      point - the element to test for membership
      Returns:
      true if this set contains the element, false otherwise
      See Also:
    • containsPoint

      public boolean containsPoint(List<Real> point)
      Description copied from interface: TopologicalSpace
      Checks if this space contains the given point.

      Named containsPoint to avoid erasure conflict with Set.contains.

      Specified by:
      containsPoint in interface TopologicalSpace<List<Real>>
      Parameters:
      point - the point to check
      Returns:
      true if the point is in this space
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Set
      Returns true if this set contains no elements.

      The empty set (∅) is a fundamental concept in set theory. It is the unique set containing no elements.

      Specified by:
      isEmpty in interface Set<List<Real>>
      Returns:
      true if this set is empty
    • description

      public String description()
      Description copied from interface: Set
      Returns a human-readable description of this set.

      Examples:

      • "ℝ (Real Numbers)"
      • "ℤ/12ℤ (Integers modulo 12)"
      • "{1, 2, 3, 4, 5}"

      Specified by:
      description in interface Set<List<Real>>
      Returns:
      a description of this set
    • intersection

      public Set<List<Real>> intersection(Set<List<Real>> other)
      Returns the intersection of this interval with another.
    • union

      public Set<List<Real>> union(Set<List<Real>> other)
      Returns the bounding interval containing both this and another.
    • difference

      public Set<List<Real>> difference(Set<List<Real>> other)
    • isSubsetOf

      public boolean isSubsetOf(Set<List<Real>> other)
    • overlaps

      public boolean overlaps(Set<List<Real>> other)
    • isOpen

      public boolean isOpen()
      Description copied from interface: TopologicalSpace
      Checks if this set is open in the topology.
      Specified by:
      isOpen in interface TopologicalSpace<List<Real>>
      Returns:
      true if this is an open set
    • isClosed

      public boolean isClosed()
      Description copied from interface: TopologicalSpace
      Checks if this set is closed in the topology.
      Specified by:
      isClosed in interface TopologicalSpace<List<Real>>
      Returns:
      true if this is a closed set
    • volume

      public Real volume()
      Computes the volume (N-dimensional measure) of this interval.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object