Class PointN

java.lang.Object
  extended byPoint
      extended byPointN
All Implemented Interfaces:
java.lang.Cloneable

public class PointN
extends Point

PointN is a subclass of Point extending Point to the general case of N dimensions.


Constructor Summary
PointN(double[] z)
           
 
Method Summary
 void abs()
          Instance method to take the absolute value of this PointN.
 void add(Point delta)
          Instance method to add a PointN to this PointN.
 java.lang.Object clone()
          Overrides the Point.clone() method to enable a deep copy.
 double coordinate(int i)
          Instance method to return the ith coordinate of this PointN.
 int dimension()
          Instance method to return d, the dimension of this PointN.
 double max()
          Instance method to return the maximum value of this PointN.
 double min()
          Instance method to return the minimum value of this PointN.
 void multiply(double s)
          Instance method to multiply this PointN by a double.
 void round(int n)
          Instance method to round this PointN to 10^(n) accuracy.
 void setCoordinate(int i, double value)
          Instance method to set the ith coordinate of this PointN.
 java.lang.String toString()
          Returns the PointN in readable form.
 void truncate(int n)
          Instance method to truncate this PointN to 10^(n) accuracy.
 
Methods inherited from class Point
abs, add, add, add, multiply
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointN

public PointN(double[] z)
Method Detail

clone

public java.lang.Object clone()
Overrides the Point.clone() method to enable a deep copy.

Overrides:
clone in class Point

dimension

public int dimension()
Instance method to return d, the dimension of this PointN.

Specified by:
dimension in class Point

coordinate

public double coordinate(int i)
Instance method to return the ith coordinate of this PointN.

Specified by:
coordinate in class Point

setCoordinate

public void setCoordinate(int i,
                          double value)
Instance method to set the ith coordinate of this PointN.


add

public void add(Point delta)
Instance method to add a PointN to this PointN.

Specified by:
add in class Point

multiply

public void multiply(double s)
Instance method to multiply this PointN by a double.

Specified by:
multiply in class Point

abs

public void abs()
Instance method to take the absolute value of this PointN.

Specified by:
abs in class Point

max

public double max()
Instance method to return the maximum value of this PointN.

Specified by:
max in class Point

min

public double min()
Instance method to return the minimum value of this PointN.

Specified by:
min in class Point

toString

public java.lang.String toString()
Returns the PointN in readable form.

Specified by:
toString in class Point

truncate

public void truncate(int n)
Instance method to truncate this PointN to 10^(n) accuracy.

Specified by:
truncate in class Point

round

public void round(int n)
Instance method to round this PointN to 10^(n) accuracy.

Specified by:
round in class Point