All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.statoid.Position

java.lang.Object
   |
   +----benno.statoid.Position

public final class Position
extends Object

Variable Index

 o coord
Stores the coordinates, and implicitly (in the length of the array) the dimension of the Position.

Constructor Index

 o Position(int)
All coords are set to 0 by default

Method Index

 o distanceFrom(Position)
 o moveNearerTo(Position, double)
coeff must be between 0..1 inclusive
 o randomize()

Variables

 o coord
 public double coord[]
Stores the coordinates, and implicitly (in the length of the array) the dimension of the Position. Co-ords must always be between 0 and 1 (ie within or on the surface of an appropriately dimensioned hypercube.

Constructors

 o Position
 public Position(int dimension)
All coords are set to 0 by default

Methods

 o randomize
 public void randomize()
 o distanceFrom
 public double distanceFrom(Position p)
 o moveNearerTo
 public void moveNearerTo(Position p,
                          double coeff)
coeff must be between 0..1 inclusive


All Packages  Class Hierarchy  This Package  Previous  Next  Index