|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object smithers.algorithms.Vector
public class Vector
Implements a collection of useful vector related algorithms.
Method Summary | |
---|---|
static float[] |
difference(float[] vector1,
float[] vector2)
Computes the difference between two vectors. |
static float[] |
normalise(float[] vector)
Normalises a vector. |
static float |
scalarProduct(float[] vector1,
float[] vector2)
Computes the scalar product of two vectors. |
static float[] |
sum(float[]... vectors)
Computes the sum of vectors. |
static float |
tripleProduct(float[] p,
float[] q,
float[] r)
Calculates the scalar triple product of 3 vectors. |
static float[] |
vectorProduct(float[] vector1,
float[] vector2)
Computes the vector product of two vectors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float[] sum(float[]... vectors)
vectors
- some vectors
public static float[] difference(float[] vector1, float[] vector2)
vector1
- a vectorvector2
- another vector
vector1 - vector2
public static float scalarProduct(float[] vector1, float[] vector2)
vector1
- a vectorvector2
- another vector
vector1
⋅vector2
public static float[] vectorProduct(float[] vector1, float[] vector2)
vector1
- a vectorvector2
- another vector
vector1
×vector2
public static float tripleProduct(float[] p, float[] q, float[] r)
p
- the first vectorq
- the second vectorr
- the third vector
p
⋅(p
×q)
public static float[] normalise(float[] vector)
vector
- a vector
vector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |