vec_math
Class vector

java.lang.Object
  extended by vec_math.vector

public class vector
extends Object

class providing simple vector operations.


Field Summary
 boolean carthesian
           
 double[] coor
           
 boolean coordinates
           
 boolean cylinder
           
 double phi
           
 double Phi
           
 double r
           
 double R
           
 boolean spheric
           
 double theta
           
 boolean valid
           
 double x
           
 double y
           
 double z
           
 double Z
           
 
Constructor Summary
vector()
           
vector(double[] a)
           
 
Method Summary
 vector Carthesian()
           
 vector Carthesian(double[] a)
           
 vector Carthesian(double x, double y, double z)
           
 void carthToCylinder()
           
 void carthToSphere()
           
 vector copy()
           
 vector cross_product(vector with)
           
 vector Cylinder(double R, double Phi, double Z)
           
 void cylinderToCarth()
           
 void cylinderToSpheric()
           
 boolean equals(Object obj)
           
 void pickCarth()
           
 void pickCylinder()
           
 void pickSphere()
           
 double scal_product(vector with)
           
 vector scale(double factor)
           
 vector Spheric(double r, double phi, double theta)
           
 void sphericToCarth()
           
 void sphericToCylinder()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valid

public boolean valid

coordinates

public boolean coordinates

coor

public double[] coor

carthesian

public boolean carthesian

x

public double x

y

public double y

z

public double z

spheric

public boolean spheric

r

public double r

phi

public double phi

theta

public double theta

cylinder

public boolean cylinder

R

public double R

Phi

public double Phi

Z

public double Z
Constructor Detail

vector

public vector()

vector

public vector(double[] a)
Parameters:
a -
Method Detail

copy

public vector copy()
Returns:
vector

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Parameters:
obj -
Returns:
boolean

Carthesian

public vector Carthesian()
Returns:
vector

Carthesian

public vector Carthesian(double[] a)
Parameters:
a -
Returns:
vector

Carthesian

public vector Carthesian(double x,
                         double y,
                         double z)
Parameters:
x -
y -
z -
Returns:
vector

Spheric

public vector Spheric(double r,
                      double phi,
                      double theta)
Parameters:
r -
phi -
theta -
Returns:
vector

Cylinder

public vector Cylinder(double R,
                       double Phi,
                       double Z)
Parameters:
R -
Phi -
Z -
Returns:
vector

carthToSphere

public void carthToSphere()

carthToCylinder

public void carthToCylinder()

sphericToCarth

public void sphericToCarth()

sphericToCylinder

public void sphericToCylinder()

cylinderToCarth

public void cylinderToCarth()

cylinderToSpheric

public void cylinderToSpheric()

pickCarth

public void pickCarth()

pickSphere

public void pickSphere()

pickCylinder

public void pickCylinder()

scale

public vector scale(double factor)
Parameters:
factor -
Returns:
vector

scal_product

public double scal_product(vector with)
Parameters:
with -
Returns:
double

cross_product

public vector cross_product(vector with)
Parameters:
with -
Returns:
vector