cdx
Class Partition

java.lang.Object
  extended by cdx.Partition

public class Partition
extends java.lang.Object

This class evenly distributes lists of motions which may be collided to each element of the shared variable `parts', so that each DetectorHandler can retrieve the related list regarding to its ID.


Constructor Summary
Partition(int n)
          Constructor
 
Method Summary
 void clear()
          Clear the shared `parts'.
 List getDetectorWork(int id)
          Return an ID for a DetectorHandler.
 void recordMotionList(List motions)
          Method to add a list of motions in parts[i].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Partition

public Partition(int n)
Constructor

Parameters:
n - the number of DetectorHandlers
Method Detail

clear

public void clear()
Clear the shared `parts'.


recordMotionList

public void recordMotionList(List motions)
Method to add a list of motions in parts[i].

Parameters:
motions - a list of motions which may be collided in a voxel

getDetectorWork

public List getDetectorWork(int id)
Return an ID for a DetectorHandler.