ucl.physiol.neuroconstruct.project.packing
Class RandomCellPackingAdapter

java.lang.Object
  extended by ucl.physiol.neuroconstruct.project.packing.CellPackingAdapter
      extended by ucl.physiol.neuroconstruct.project.packing.RandomCellPackingAdapter

public class RandomCellPackingAdapter
extends CellPackingAdapter

Cell packing adapter which places a number of cells in random locations in the specified region

Author:
Padraig Gleeson

Field Summary
static String CELL_NUMBER_POLICY
           
static String EDGE_POLICY
           
static String SELF_OVERLAP_POLICY
           
 
Fields inherited from class ucl.physiol.neuroconstruct.project.packing.CellPackingAdapter
description, myCell, myRegion, OTHER_OVERLAP_POLICY, parameterList
 
Constructor Summary
RandomCellPackingAdapter()
           
 
Method Summary
 boolean avoidOtherCellGroups()
           
protected  Point3f generateNextPosition()
          Internal function to generate the next position
 int getMaxNumberCells()
           
static void main(String[] args)
           
 void setMaxNumberCells(int num)
           
 void setParameter(String parameterName, float parameterValue)
           
 String toNiceString()
          For a more plain english description of the settings
 String toString()
          Returns a short summary of the class's state, for GUIs etc.
 
Methods inherited from class ucl.physiol.neuroconstruct.project.packing.CellPackingAdapter
addRegionAndCellInfo, cancelPosition, doesCellCollideWithExistingCells, getCurrentNumberPositions, getDescription, getLastPosTaken, getNextPosition, getNumPosAlreadyTaken, getParameterList, reset, setParameterList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EDGE_POLICY

public static final String EDGE_POLICY
See Also:
Constant Field Values

SELF_OVERLAP_POLICY

public static final String SELF_OVERLAP_POLICY
See Also:
Constant Field Values

CELL_NUMBER_POLICY

public static final String CELL_NUMBER_POLICY
See Also:
Constant Field Values
Constructor Detail

RandomCellPackingAdapter

public RandomCellPackingAdapter()
Method Detail

generateNextPosition

protected Point3f generateNextPosition()
                                throws CellPackingException
Description copied from class: CellPackingAdapter
Internal function to generate the next position

Specified by:
generateNextPosition in class CellPackingAdapter
Returns:
The position as Point3d object
Throws:
CellPackingException - if a position cannoth be generated, i.e. region full

getMaxNumberCells

public int getMaxNumberCells()

setMaxNumberCells

public void setMaxNumberCells(int num)

avoidOtherCellGroups

public boolean avoidOtherCellGroups()
Overrides:
avoidOtherCellGroups in class CellPackingAdapter

setParameter

public void setParameter(String parameterName,
                         float parameterValue)
                  throws CellPackingException
Specified by:
setParameter in class CellPackingAdapter
Throws:
CellPackingException

toString

public String toString()
Description copied from class: CellPackingAdapter
Returns a short summary of the class's state, for GUIs etc. Included here (even though it's in Object) to force the subclasses to implement it

Specified by:
toString in class CellPackingAdapter
Returns:
A string rep of internal state

toNiceString

public String toNiceString()
Description copied from class: CellPackingAdapter
For a more plain english description of the settings

Specified by:
toNiceString in class CellPackingAdapter

main

public static void main(String[] args)