JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.forceFields
Class SecondBody

java.lang.Object
  extended bygov.nasa.javaGenes.forceFields.MultiBody
      extended bygov.nasa.javaGenes.forceFields.Body
          extended bygov.nasa.javaGenes.forceFields.SecondBody
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SecondBody
extends Body

represents the second body and relevant parameters of a three-body.

See Also:
Serialized Form

Field Summary
 double radialDistance
          distance to the first body
 ThirdBody[] thirdBody
          don't access until after createArrays has been called
 boolean twoBodyTermMatters
          used to turn of calculation off two body energies so the three body terms will be more important.
protected  java.util.Vector vector
           
 
Fields inherited from class gov.nasa.javaGenes.forceFields.Body
species, speciesIndex
 
Fields inherited from class gov.nasa.javaGenes.forceFields.MultiBody
_name, howMany
 
Constructor Summary
SecondBody(Species s, double distance)
           
SecondBody(Species s, double distance, boolean twoBodiesCount)
           
 
Method Summary
 void add(ThirdBody body)
           
 void createArrays()
          moves the ThreeBody(s) from the vector to the array
 ThirdBody[] getThirdBodies()
           
static Bodies[] makeArray(Species[] species, Distribution distribution)
          make a set of Bodies to use in a fitness function.
 void removeInternalElementsOutsideOfCutoff(Potential form, int iSpeciesIndex)
           
 void setSpeciesIndices(Species2IndexMap map)
          sets the array index for the species for each body for fast access
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.forceFields.Body
scaleLengthsBy, setSpeciesIndex, tabSeparatedString, withinCutoff
 
Methods inherited from class gov.nasa.javaGenes.forceFields.MultiBody
copy, divideHowManyBy, getHowMany, getName, incrementHowMany, removeInternalElementsOutsideOfCutoff, setHowMany, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

radialDistance

public double radialDistance
distance to the first body


twoBodyTermMatters

public boolean twoBodyTermMatters
used to turn of calculation off two body energies so the three body terms will be more important.


vector

protected java.util.Vector vector

thirdBody

public ThirdBody[] thirdBody
don't access until after createArrays has been called

Constructor Detail

SecondBody

public SecondBody(Species s,
                  double distance)
Parameters:
s - the species of the second body
distance - the distance to the first body

SecondBody

public SecondBody(Species s,
                  double distance,
                  boolean twoBodiesCount)
Parameters:
s - the species of the second body
distance - the distance to the first body
twoBodiesCount - flag to turn of calculation of two body energies
Method Detail

getThirdBodies

public ThirdBody[] getThirdBodies()

removeInternalElementsOutsideOfCutoff

public void removeInternalElementsOutsideOfCutoff(Potential form,
                                                  int iSpeciesIndex)

add

public void add(ThirdBody body)

createArrays

public void createArrays()
moves the ThreeBody(s) from the vector to the array


toString

public java.lang.String toString()

makeArray

public static Bodies[] makeArray(Species[] species,
                                 Distribution distribution)
make a set of Bodies to use in a fitness function.

Parameters:
species - all the species to use
distribution - provides lengths

setSpeciesIndices

public void setSpeciesIndices(Species2IndexMap map)
sets the array index for the species for each body for fast access


JavaGenes, NASA Ames. Written largely by Al Globus