hep.physics.vec
Class BasicHep3Vector
- java.lang.Object
-
- hep.physics.vec.BasicHep3Vector
-
- All Implemented Interfaces:
- Hep3Vector, java.io.Serializable
public class BasicHep3Vector extends java.lang.Object implements Hep3Vector, java.io.Serializable
Basic implementation of a Hep3Vector- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BasicHep3Vector()BasicHep3Vector(double[] d)Create a BasicHep3Vector from a double arrayBasicHep3Vector(double dx, double dy, double dz)BasicHep3Vector(float[] f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)inthashCode()doublemagnitude()The length of the 3-vector.doublemagnitudeSquared()The square of the lengthvoidsetV(double dx, double dy, double dz)java.lang.StringtoString()double[]v()doublex()doubley()doublez()
-
-
-
Constructor Detail
-
BasicHep3Vector
public BasicHep3Vector()
-
BasicHep3Vector
public BasicHep3Vector(double dx, double dy, double dz)
-
BasicHep3Vector
public BasicHep3Vector(double[] d)
Create a BasicHep3Vector from a double array- Parameters:
d- An array {x,y,z}
-
BasicHep3Vector
public BasicHep3Vector(float[] f)
-
-
Method Detail
-
setV
public void setV(double dx, double dy, double dz)
-
x
public double x()
- Specified by:
xin interfaceHep3Vector
-
y
public double y()
- Specified by:
yin interfaceHep3Vector
-
z
public double z()
- Specified by:
zin interfaceHep3Vector
-
magnitude
public double magnitude()
Description copied from interface:Hep3VectorThe length of the 3-vector.- Specified by:
magnitudein interfaceHep3Vector
-
magnitudeSquared
public double magnitudeSquared()
Description copied from interface:Hep3VectorThe square of the length- Specified by:
magnitudeSquaredin interfaceHep3Vector
-
v
public double[] v()
- Specified by:
vin interfaceHep3Vector
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG