|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corpus.analyser.MathVector
A Mathmatical style vector in 3D space with a start and finish point as well as a magnitude. pg 765 in Anton.
Field Summary | |
protected double |
magnitude
|
protected double |
magX
i, j, k |
protected double |
magY
i, j, k |
protected double |
magZ
i, j, k |
protected double |
x1
|
protected double |
x2
|
protected double |
y1
|
protected double |
y2
|
protected double |
z1
|
protected double |
z2
|
Constructor Summary | |
MathVector(double magX,
double magY,
double magZ)
Create from three magnitudes |
|
MathVector(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
|
Method Summary | |
void |
add(MathVector sv2)
|
void |
add2(MathVector sv2)
|
void |
addMag(double X,
double Y,
double Z)
|
double |
angleBetween(MathVector mv1)
|
static double |
angleBetween(MathVector mv1,
MathVector mv2)
Anton pg778 Radians |
double |
angleBetweenDeg(MathVector mv1)
|
static double |
angleBetweenDeg(MathVector mv1,
MathVector mv2)
Returns angle between two MathVectors in Degrees |
static MathVector |
average(java.util.Vector mvectors)
Given a vector of MathVectors, this method will return the average of all the magnitudes and points. |
static MathVector |
averageMagnitude(java.util.Vector mvectors)
Given a vector of MathVectors, this method will return the average of all the magnitudes, centered at the origin. |
boolean |
checkNaN()
Returns true if one of the components of the MathVector is a Double.NaN |
static MathVector |
crossProduct(MathVector mv1,
MathVector mv2)
Anton pg787 |
static double |
distanceBetween(double magX,
double magY,
double magZ)
|
static double |
distanceBetween(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
|
void |
divide(double n)
|
void |
divideMag(double n)
|
MathVector |
divideMV(double n)
|
double |
dotProduct(MathVector mv1)
Anton pg776 |
static double |
dotProduct(MathVector mv1,
MathVector mv2)
Anton pg776 |
double[] |
getFinish()
|
double[] |
getMag()
|
double[] |
getStart()
|
double |
magnitude()
Anton pg777 ||v|| = sqrt(v.v) |
static void |
main(java.lang.String[] args)
|
static void |
saveCSV(java.lang.String path,
java.util.Vector mvectors)
Turns a Vector of MathVectors into a string and saves it to path. |
void |
sub(MathVector sv2)
|
java.lang.String |
toString()
|
MathVector |
unitVector()
returns a MathVector that is the unit vector of the this MathVector UV = V/|V| |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double x1
protected double y1
protected double x2
protected double y2
protected double z1
protected double z2
protected double magX
protected double magY
protected double magZ
protected double magnitude
Constructor Detail |
public MathVector(double magX, double magY, double magZ)
public MathVector(double x1, double y1, double z1, double x2, double y2, double z2)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public double[] getStart()
public double[] getFinish()
public double[] getMag()
public static double distanceBetween(double x1, double y1, double z1, double x2, double y2, double z2)
public static double distanceBetween(double magX, double magY, double magZ)
public void add(MathVector sv2)
public void add2(MathVector sv2)
public void sub(MathVector sv2)
public void addMag(double X, double Y, double Z)
public void divideMag(double n)
public void divide(double n)
public MathVector divideMV(double n)
public static MathVector averageMagnitude(java.util.Vector mvectors)
public static MathVector average(java.util.Vector mvectors)
public static void saveCSV(java.lang.String path, java.util.Vector mvectors)
public boolean checkNaN()
public double dotProduct(MathVector mv1)
public static double dotProduct(MathVector mv1, MathVector mv2)
public static MathVector crossProduct(MathVector mv1, MathVector mv2)
public double magnitude()
public double angleBetween(MathVector mv1)
public static double angleBetween(MathVector mv1, MathVector mv2)
public double angleBetweenDeg(MathVector mv1)
public static double angleBetweenDeg(MathVector mv1, MathVector mv2)
public MathVector unitVector()
public static void main(java.lang.String[] args)
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |