public class CommonsVector3D extends java.lang.Object implements Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
Vector.Vector3DType
Constructor and Description |
---|
CommonsVector3D() |
CommonsVector3D(double[] d) |
CommonsVector3D(double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
Vector |
add(Vector m)
get the sum of this vector with another vector
|
double |
distance(Vector m)
get the distance between this vector and another vector
|
double |
dotProduct()
get the dot product of this vector with itself
|
Vector |
ebeMultiply(Vector m)
multiply this vector with another vector element by element
|
boolean |
equals(Vector m)
check if this vector equals another vector m.
|
Vector |
exp()
do Math.exp() calculation for every element in the vector
|
double |
getEntry(int i)
get one element in this vector
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getInternalVector()
get the value of internal vector of this vector in the vector type in the
library
|
double |
getNorm()
get the norm of this vector
|
double |
getX()
get the value of x coordinate of this vector
|
double |
getY()
get the value of y coordinate of this vector
|
double |
getZ()
get the value of z coordinate of this vector
|
Vector |
scalarMultiply(double d)
multiply this vector with a scalar value
|
void |
setInternalVector(org.apache.commons.math3.geometry.euclidean.threed.Vector3D internalVector)
set the value of internal vector
|
Vector |
subtract(Vector m)
get the result of this vector subtracts another vector
|
double[] |
toArray()
get the value of this vector in the form of a double array
|
public CommonsVector3D(double x, double y, double z)
public CommonsVector3D()
public CommonsVector3D(double[] d)
public double dotProduct()
Vector
dotProduct
in interface Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
Double
public double getNorm()
Vector
public Vector add(Vector m)
Vector
public Vector subtract(Vector m)
Vector
public Vector scalarMultiply(double d)
Vector
scalarMultiply
in interface Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
d
- -the scalar value, -Double
Vector
public double getX()
Vector
public double getY()
Vector
public double getZ()
Vector
public double distance(Vector m)
Vector
public Vector ebeMultiply(Vector m)
Vector
ebeMultiply
in interface Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
m
- -Vector
Vector
public double getEntry(int i)
Vector
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getInternalVector()
Vector
getInternalVector
in interface Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
public void setInternalVector(org.apache.commons.math3.geometry.euclidean.threed.Vector3D internalVector)
Vector
setInternalVector
in interface Vector<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
internalVector
- , a vector in the vector type in the librarypublic boolean equals(Vector m)
Vector
public double[] toArray()
Vector