Uses of Class
org.evoludo.geom.Vector2D
Packages that use Vector2D
Package
Description
The geometric utilities for working with shapes and spatial relationships.
The toolkit to explore interactive evolutionary models.
-
Uses of Vector2D in org.evoludo.geom
Methods in org.evoludo.geom that return Vector2DModifier and TypeMethodDescriptionVector2D.add(double dx, double dy) Shift the coordinates of this 2D vectordxto the right anddyupwards.Add the 2D vectorsaandband store the result in this vector.Add the 2D vectoraddto this vector.Vector2D.negate()Negates the coordinates of 2D vectorvto obtain-v.Vector2D.normalize()Normalizes the 2D vectorvsuch that its length is|v|=1while preserving the direction.Vector2D.normalize(double l) Normalizes the 2D vectorvsuch that its length isl, i.e.Scales the 2D vector by the scalar factorsand adds the 2D vectorato obtains*v+a.Set the 2D vector to pointing fromfromtoto.Vector2D.sub(double dx, double dy) Subtractdxanddyfrom coordinates, i.e.Subtract the 2D vectorsubfrom this vector.Subtract 2D vectorsbfromaand store result in this 2D vector.Methods in org.evoludo.geom with parameters of type Vector2DModifier and TypeMethodDescriptionAdd the 2D vectoraddto this vector.doubleCalculate the dot product of 2D vectordand this vector.Scales the 2D vector by the scalar factorsand adds the 2D vectorato obtains*v+a.Set the line to pass through pointpin the direction of vectorv.Subtract the 2D vectorsubfrom this vector.Subtract 2D vectorsbfromaand store result in this 2D vector.Constructors in org.evoludo.geom with parameters of type Vector2D -
Uses of Vector2D in org.evoludo.simulator
Fields in org.evoludo.simulator declared as Vector2DModifier and TypeFieldDescriptionprivate final Vector2DNetwork2D.attractionHelper variable to store intermediate results when considering the potential energy resulting from the attraction between neighbouring nodes.private final Vector2DNetwork2D.repulsionHelper variable to store intermediate results when considering the potential energy resulting from the repulsion between nodes.private final Vector2DNetwork2D.vecTemporary storage for the directional vector connecting two nodes.