Package org.openscience.cdk.math
Class Vector
- java.lang.Object
-
- org.openscience.cdk.math.Vector
-
public class Vector extends Object
This class handles vectors.- Belongs to CDK module:
- qm
-
-
Field Summary
Fields Modifier and Type Field Description static Vector
EX
Unary vector in 3 dimensional spacestatic Vector
EY
Unary vector in 3 dimensional spacestatic Vector
EZ
Unary vector in 3 dimensional spacestatic Vector
NULLVECTOR
Null vector in 3 dimensional spaceint
size
The size of this vectordouble[]
vector
The content of this vector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
add(Vector b)
Addition from two vectorsVector
cross(Vector b)
Cross product, only well definited in R^3double
dot(Vector b)
Multiplikation from two vectorsVector
duplicate()
Copy a vectorint
getSize()
Returns the size of this vectordouble
length()
Return the length from this vectorVector
mul(double b)
Multiplikation from a vectors with an doubleVector
negate()
Negates this vectorVector
normalize()
Normalize this vectorVector
sub(Vector b)
Subtraktion from two vectorsString
toString()
Return a vector as a string
-
-
-
Field Detail
-
NULLVECTOR
public static final Vector NULLVECTOR
Null vector in 3 dimensional space
-
EX
public static final Vector EX
Unary vector in 3 dimensional space
-
EY
public static final Vector EY
Unary vector in 3 dimensional space
-
EZ
public static final Vector EZ
Unary vector in 3 dimensional space
-
vector
public final double[] vector
The content of this vector
-
size
public final int size
The size of this vector
-
-
Method Detail
-
getSize
public int getSize()
Returns the size of this vector
-
mul
public Vector mul(double b)
Multiplikation from a vectors with an double
-
dot
public double dot(Vector b)
Multiplikation from two vectors
-
length
public double length()
Return the length from this vector
-
normalize
public Vector normalize()
Normalize this vector
-
negate
public Vector negate()
Negates this vector
-
duplicate
public Vector duplicate()
Copy a vector
-
-