Class pmr.euclid.Real2Range
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.euclid.Real2Range

java.lang.Object
   |
   +----pmr.euclid.Status
           |
           +----pmr.euclid.Real2Range

public class Real2Range
extends Status

Real2Range - 2-D double limits

Contains two RealRanges. Can therefore be used to describe 2-dimensional limits (e.g. axes of graphs, rectangles in graphics, limits of a molecule, etc.)

Default is two default/invalid RealRange components. Adding points will create valid ranges.

Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o Real2Range()
 o Real2Range(Real2Range)
copy constructor
 o Real2Range(RealRange, RealRange)
initialise with min and max values;

Method Index

 o add(Real2)
add a Real2 to a range
 o equals(Real2Range)
 o getXRange()
get xrange
 o getYRange()
get yrange
 o includes(Real2)
is an Real2 within a Real2Range?
 o includes(Real2Range)
is one Real2Range completely within another?
 o intersectionWith(Real2Range)
intersect two ranges and take the range common to both; return invalid range if no overlap or either is null/invalid
 o isValid()
a Real2Range is valid if both its constituent ranges are
 o plus(Real2Range)
merge two ranges and take the maximum extents
 o toString()

Constructors

 o Real2Range
  public Real2Range()
 o Real2Range
  public Real2Range(RealRange xr,
                    RealRange yr)
initialise with min and max values;
 o Real2Range
  public Real2Range(Real2Range r)
copy constructor

Methods

 o isValid
  public boolean isValid()
a Real2Range is valid if both its constituent ranges are
 o equals
  public boolean equals(Real2Range r2)
 o plus
  public Real2Range plus(Real2Range r2)
merge two ranges and take the maximum extents
 o intersectionWith
  public Real2Range intersectionWith(Real2Range r2)
intersect two ranges and take the range common to both; return invalid range if no overlap or either is null/invalid
 o getXRange
  public RealRange getXRange()
get xrange
 o getYRange
  public RealRange getYRange()
get yrange
 o includes
  public boolean includes(Real2 p)
is an Real2 within a Real2Range?
 o includes
  public boolean includes(Real2Range r)
is one Real2Range completely within another?
 o add
  public void add(Real2 p)
add a Real2 to a range
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index