gov.nasa.javaGenes.forceFields
Class ThirdBody
java.lang.Object
gov.nasa.javaGenes.forceFields.MultiBody
gov.nasa.javaGenes.forceFields.Body
gov.nasa.javaGenes.forceFields.ThirdBody
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class ThirdBody
- extends Body
represents the last body and relevant parameters of a three-body.
- See Also:
- Serialized Form
Field Summary |
double |
angle
the angle between the lines joining the second and third bodies and the first body |
double |
radialDistance
the distance of the last body to the first body |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
radialDistance
public double radialDistance
- the distance of the last body to the first body
angle
public double angle
- the angle between the lines joining the second and third bodies and the first body
ThirdBody
public ThirdBody(Species s,
double distance,
double a)
- Parameters:
s
- the species of the third bodydistance
- the distance between the third and first bodya
- the angle
toString
public java.lang.String toString()
makeArray
public static Bodies[] makeArray(Species species1,
Species species2,
Species species3,
Distribution twoBodyLengths,
Distribution thirdBodyLengths,
Distribution angles,
boolean twoBodiesCount)
- create an array of Bodies to use in the fitness function
- Parameters:
species1
- the species of the first bodyspecies2
- the species of the second bodyspecies3
- the species of the third bodytwoBodyLengths
- will provide values for the distance between the first and second bodiestwoBodiesCount
- set to false so that only three energies will be calculated. This is
needed because the two body energies are so much larger than the three body energies that
the three parameters don't evolve very well.