Module vecmath

Class Range

java.lang.Object
de.grogra.vecmath.Range

public class Range extends Object
This class implements interval arithmetic. Each range is an interval [a,b] with a <= b. Some operations for interval arithmetic are implemented. In general those operations expect an additional parameter out to store the result. For some information on interval arithmetic read: T. Hickey, Q. Ju, and M. H. Van Emden. 2001. Interval arithmetic: From principles to implementation. J. ACM 48, 5 (September 2001), 1038-1068. DOI=10.1145/502102.502106 http://doi.acm.org/10.1145/502102.502106
Author:
Reinhard Hemmerling
  • Field Details

    • a

      public double a
    • b

      public double b
  • Constructor Details

    • Range

      public Range()
    • Range

      public Range(double d)
    • Range

      public Range(double min, double max)
    • Range

      public Range(Range r)
  • Method Details

    • toString

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

      public void set(double d)
    • set

      public void set(double min, double max)
    • set

      public void set(Range r)
    • contains

      public boolean contains(double x)
    • contains

      public boolean contains(Range x)
      Returns true if the supplied Range is fully contained within this Range. Fully contained is defined as having the minimum and maximum values of the fully contained range lie within the range of values of the containing Range.
      Parameters:
      x - range to check
      Returns:
    • add

      public static final Range add(Range out, Range x, Range y)
    • sub

      public static final Range sub(Range out, Range x, Range y)
    • mul

      public static final Range mul(Range out, Range x, Range y)
    • div

      public static final Range div(Range out, Range x, Range y)
    • sqr

      public static final Range sqr(Range out, Range x)
    • sqrt

      public static final Range sqrt(Range out, Range x)
    • pow

      public static final Range pow(Range out, Range x, double e)
    • abs

      public static final Range abs(Range out, Range x)
    • cos

      public static final Range cos(Range out, Range x)
    • sin

      public static final Range sin(Range out, Range x)
    • tan

      public static final Range tan(Range out, Range x)
    • acos

      public static final Range acos(Range out, Range x)
    • asin

      public static final Range asin(Range out, Range x)
    • atan

      public static final Range atan(Range out, Range x)
    • atan2

      public static final Range atan2(Range out, Range y, Range x)