astex
Class Lattice

java.lang.Object
  extended by astex.Lattice

public class Lattice
extends java.lang.Object


Field Summary
static int Undefined
          Constant to indicate we don't care about ids.
 
Constructor Summary
Lattice(double d)
          Create an empty lattice object.
 
Method Summary
 void add(int id, double x, double y, double z)
          Add an object reference to the lattice.
 int BOX(double x)
          Return the cell box id along one axis.
 int getCellContents(int icell, IntArray c)
          Get the contents of the cell.
 int getCellCount()
          Get the number of occupied cells.
 double getMaximumDistance()
          Return the maximum search distance.
 int getObjectCount()
          Return the number of objects.
 int getPossibleCellNeighbours(int cid, IntArray objects)
          Get the possible pairs of neighbours from a cell.
 int getPossibleNeighbours(int id, double x, double y, double z, IntArray neighbours, boolean allNeighbours)
          Return the possible neighbours of the point.
static void main(java.lang.String[] args)
          Test harness for the lattice construction.
 void printStatistics(int info)
          Print info about the Lattice object.
 void setMaximumDistance(double d)
          Set the maximum search distance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Undefined

public static final int Undefined
Constant to indicate we don't care about ids.

See Also:
Constant Field Values
Constructor Detail

Lattice

public Lattice(double d)
Create an empty lattice object.

Method Detail

setMaximumDistance

public void setMaximumDistance(double d)
Set the maximum search distance.


getMaximumDistance

public double getMaximumDistance()
Return the maximum search distance.


getObjectCount

public int getObjectCount()
Return the number of objects.


getCellCount

public int getCellCount()
Get the number of occupied cells.


add

public void add(int id,
                double x,
                double y,
                double z)
Add an object reference to the lattice.


getCellContents

public int getCellContents(int icell,
                           IntArray c)
Get the contents of the cell.


getPossibleNeighbours

public int getPossibleNeighbours(int id,
                                 double x,
                                 double y,
                                 double z,
                                 IntArray neighbours,
                                 boolean allNeighbours)
Return the possible neighbours of the point.


getPossibleCellNeighbours

public int getPossibleCellNeighbours(int cid,
                                     IntArray objects)
Get the possible pairs of neighbours from a cell.


printStatistics

public void printStatistics(int info)
Print info about the Lattice object.


BOX

public int BOX(double x)
Return the cell box id along one axis.


main

public static void main(java.lang.String[] args)
Test harness for the lattice construction.