edu.uah.math.distributions
Class Domain

java.lang.Object
  |
  +--edu.uah.math.distributions.Domain

public class Domain
extends java.lang.Object

This class defines a partition of an interval into subintervals of equal width. These objects are used to define default domains. A finite domain can be modeled by the values (midpoints) of the partition. The boundary points are a + i * w for i = 0, ..., n, where n is the size of the partition, a is the lower bound and w the width. The values (midpoints) are a + (i + 1/2) * w, for i = 0, ..., n - 1.


Constructor Summary
Domain()
          This default constructor creates a new partition of [0, 1] into 10 equal subintervals
Domain(double b)
          This special constructor creates a new partition of [0, b] into 10 equal subintervals
Domain(double a, double b, double w)
          This general constructor creates a new partition of a specified interval [a, b] into subintervals of width w
 
Method Summary
 double getBound(int i)
          This method returns the boundary point corresponding to a given index
 int getIndex(double x)
          This method returns the index of the interval containing a given value of x
 double getLowerBound()
          This method returns the lower bound
 double getLowerValue()
          This method returns the lower midpoint
 int getSize()
          This method returns the size of the partition (the number of subintervals)
 double getUpperBound()
          This method returns the upper bound
 double getUpperValue()
          This method returns the upper midpoint
 double getValue(int i)
          This method return the midpoint of the interval corresponding to a given index
 double getWidth()
          This method returns the width of the partition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domain

public Domain(double a,
              double b,
              double w)
This general constructor creates a new partition of a specified interval [a, b] into subintervals of width w


Domain

public Domain(double b)
This special constructor creates a new partition of [0, b] into 10 equal subintervals


Domain

public Domain()
This default constructor creates a new partition of [0, 1] into 10 equal subintervals

Method Detail

getIndex

public int getIndex(double x)
This method returns the index of the interval containing a given value of x


getBound

public double getBound(int i)
This method returns the boundary point corresponding to a given index


getValue

public double getValue(int i)
This method return the midpoint of the interval corresponding to a given index


getLowerBound

public double getLowerBound()
This method returns the lower bound


getUpperBound

public double getUpperBound()
This method returns the upper bound


getLowerValue

public double getLowerValue()
This method returns the lower midpoint


getUpperValue

public double getUpperValue()
This method returns the upper midpoint


getWidth

public double getWidth()
This method returns the width of the partition


getSize

public int getSize()
This method returns the size of the partition (the number of subintervals)