|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectpamMaths.PamVector
public class PamVector
| Field Summary | |
|---|---|
private static PamVector[] |
cartesianAxes
|
private static long |
serialVersionUID
|
protected double[] |
vector
|
private static PamVector |
xAxis
|
private static PamVector |
yAxis
|
private static PamVector |
zAxis
|
| Constructor Summary | |
|---|---|
PamVector()
|
|
PamVector(double[] vector)
|
|
PamVector(double x,
double y,
double z)
|
|
PamVector(PamVector vector)
|
|
| Method Summary | |
|---|---|
double |
absAngle(PamVector vec)
Calculates the smallest angle between two vectors (0 <= angle < pi/2); |
static PamVector |
add(PamVector... pamVectors)
Add any number of vectors together. |
PamVector |
add(PamVector vec)
Add another vector to this vector and return the result in a new Vector |
static PamVector |
addQuadrature(PamVector... pamVectors)
Add any number of vectors together in quadrature. |
double |
angle(PamVector vec)
Calculate the angle between two vectors |
static Jama.Matrix |
arrayToMatrix(PamVector[] pamVectors)
convert a series of vectors into a Matrix |
PamVector |
clone()
|
double |
dist(PamVector vec)
|
double |
distSquared(PamVector vec)
|
double |
dotProd(PamVector vec)
|
boolean |
equals(PamVector vec)
|
static PamVector |
getCartesianAxes(int iAxis)
|
double |
getElement(int iElement)
Get a single vector element |
int |
getPrincipleAxis()
|
PamVector |
getUnitVector()
Get the unit vector, or if the vector is zero, return the zero vector (0,0,0). |
double[] |
getVector()
|
static PamVector[] |
getVectorPairs(PamVector[] vectors)
Create a set of vector pairs, which are vectors between all the vectors in the input argument |
static PamVector |
getXAxis()
|
static PamVector |
getYAxis()
|
static PamVector |
getZAxis()
|
boolean |
isInLine(PamVector vec)
Test to see whether two vectors lie in a perfect line |
boolean |
isParallel(PamVector vec)
Tests to see whether two vectors are parallel |
double |
norm()
|
double |
normSquared()
|
PamVector |
rotate(Jama.Matrix rotationMatrix)
Rotate the vector by a matrix. |
void |
setElement(int iElement,
double val)
Set a single vector element |
void |
setVector(double[] vector)
|
PamVector |
sub(PamVector vec)
Subtract another vector from this vector and return the result in a new Vector |
double |
sumComponentsSquared(PamVector vec)
A bit like a dot product, but the three components are added in quadrature. |
PamVector |
times(double scalar)
Multiply a vector by a scalar |
java.lang.String |
toString()
|
double |
tripleDotProduct(PamVector v1,
PamVector v2)
Calculate the triple product of this with v1 and v2 |
PamVector |
vecProd(PamVector vec)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
protected double[] vector
private static final PamVector xAxis
private static final PamVector yAxis
private static final PamVector zAxis
private static final PamVector[] cartesianAxes
| Constructor Detail |
|---|
public PamVector(double[] vector)
public PamVector(double x,
double y,
double z)
public PamVector(PamVector vector)
public PamVector()
| Method Detail |
|---|
public PamVector clone()
clone in class java.lang.Objectpublic double normSquared()
public boolean equals(PamVector vec)
vec - other vector to compare.
public PamVector sub(PamVector vec)
vec - vector to subtract
public PamVector add(PamVector vec)
vec - vector to add
public static PamVector add(PamVector... pamVectors)
pamVectors - list of vectors
public static PamVector addQuadrature(PamVector... pamVectors)
pamVectors - list of vectors
public static Jama.Matrix arrayToMatrix(PamVector[] pamVectors)
pamVectors - array of vectors
public PamVector rotate(Jama.Matrix rotationMatrix)
rotationMatrix - rotation matrix
public PamVector times(double scalar)
scalar - scalar value
public PamVector getUnitVector()
public double angle(PamVector vec)
vec - other vector
public double absAngle(PamVector vec)
vec - other vector
public double distSquared(PamVector vec)
vec - other vector
public double dist(PamVector vec)
vec - other vector
public double norm()
public double dotProd(PamVector vec)
vec - a PamVector
public double sumComponentsSquared(PamVector vec)
vec - a Pam Vector
public PamVector vecProd(PamVector vec)
vec -
public double tripleDotProduct(PamVector v1,
PamVector v2)
v1 - other vectorv2 - other vector
public boolean isParallel(PamVector vec)
vec - other vector
public boolean isInLine(PamVector vec)
vec - other vector
public double[] getVector()
public void setVector(double[] vector)
public double getElement(int iElement)
iElement - element index
public void setElement(int iElement,
double val)
iElement - element indexval - element valuepublic static PamVector getXAxis()
public static PamVector getYAxis()
public static PamVector getZAxis()
public static PamVector getCartesianAxes(int iAxis)
iAxis -
public static PamVector[] getVectorPairs(PamVector[] vectors)
vectors - array of vectors
public int getPrincipleAxis()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||