FreeHEP API
Version current

hep.physics.vec
Class BasicHep3Vector

java.lang.Object
  extended byhep.physics.vec.BasicHep3Vector
All Implemented Interfaces:
Hep3Vector, Serializable

public class BasicHep3Vector
extends Object
implements Hep3Vector, Serializable

Basic implementation of a Hep3Vector

Author:
Gary Bower (grb@slac.stanford.edu)
See Also:
Serialized Form
Source Code:
BasicHep3Vector.java

Constructor Summary
BasicHep3Vector()
           
BasicHep3Vector(double[] d)
          Create a BasicHep3Vector from a double array
BasicHep3Vector(double dx, double dy, double dz)
           
BasicHep3Vector(float[] f)
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 double magnitude()
          The length of the 3-vector.
 double magnitudeSquared()
          The square of the length
 void setV(double dx, double dy, double dz)
           
 String toString()
           
 double[] v()
           
 double x()
           
 double y()
           
 double z()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
x in interface Hep3Vector

y

public double y()
Specified by:
y in interface Hep3Vector

z

public double z()
Specified by:
z in interface Hep3Vector

magnitude

public double magnitude()
Description copied from interface: Hep3Vector
The length of the 3-vector.

Specified by:
magnitude in interface Hep3Vector

magnitudeSquared

public double magnitudeSquared()
Description copied from interface: Hep3Vector
The square of the length

Specified by:
magnitudeSquared in interface Hep3Vector

v

public double[] v()
Specified by:
v in interface Hep3Vector

equals

public boolean equals(Object obj)

toString

public String toString()

hashCode

public int hashCode()

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.