Package org.robwork.sdurw_math
Class Vector6Df
- java.lang.Object
-
- org.robwork.sdurw_common.Serializable
-
- org.robwork.sdurw_math.Vector6Df
-
public class Vector6Df extends Serializable
A N-Dimensional Vector
-
-
Constructor Summary
Constructors Constructor Description Vector6Df(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector6Df
add(Vector6Df rhs)
Vector addition.Vector6Df
addAssign(Vector6Df v)
Vector addition.void
delete()
Vector6Df
devideAssign(double s)
Scalar division.Vector6Df
divide(float rhs)
Scalar division.double
dot(Vector6Df vec)
calculate the dot productEigenVector6f
e()
Accessor for the internal Eigen VectorND.Vector6Df
elemAdd(float rhs)
Scalar addition.Vector6Df
elemDivide(Vector6Df rhs)
element wise division.Vector6Df
elemMultiply(Vector6Df rhs)
Elementweise multiplication.Vector6Df
elemSubtract(float rhs)
Scalar subtraction.boolean
equals(Vector6Df rhs)
Compare with rhs for equality.float
get(long i)
static long
getCPtr(Vector6Df obj)
Vector6Df
multiply(float rhs)
Scalar multiplication.Vector6Df
multiplyAssign(double s)
Scalar multiplication.Vector6Df
negate()
Unary minus.
negative versionfloat
norm1()
Returns the Manhatten norm (1-norm) of the VectorNDfloat
norm2()
Returns the Euclidean norm (2-norm) of the VectorNDVector6Df
normalize()
normalize vector to get length 1float
normInf()
Returns the infinte norm ( \inf-norm) of the VectorNDboolean
notEqual(Vector6Df rhs)
Compare with rhs for inequality.void
set(long i, float d)
long
size()
The dimension of the VectorND (i.e.Vector6Df
subtract(Vector6Df rhs)
Vector subtraction.Vector6Df
subtractAssign(Vector6Df v)
Vector subtraction.vector_f
toStdVector()
converts the vector to a std:vectorjava.lang.String
toString()
static Vector6Df
zero()
Get zero-initialized vector.-
Methods inherited from class org.robwork.sdurw_common.Serializable
getCPtr, read, write
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Vector6Df obj)
-
delete
public void delete()
- Overrides:
delete
in classSerializable
-
size
public long size()
The dimension of the VectorND (i.e. 3).
This method is provided to help support generic algorithms using
size() and operator[].
-
elemDivide
public Vector6Df elemDivide(Vector6Df rhs)
element wise division.- Parameters:
rhs
- [in] the vector being devided with- Returns:
- the resulting Vector3D
-
elemMultiply
public Vector6Df elemMultiply(Vector6Df rhs)
Elementweise multiplication.- Parameters:
rhs
- [in] vector- Returns:
- the element wise product
-
negate
public Vector6Df negate()
Unary minus.
negative version
-
divide
public Vector6Df divide(float rhs)
Scalar division.- Parameters:
rhs
- [in] the scalar to devide with- Returns:
- result of devision
-
multiply
public Vector6Df multiply(float rhs)
Scalar multiplication.- Parameters:
rhs
- [in] the scalar to multiply with- Returns:
- the product
-
elemSubtract
public Vector6Df elemSubtract(float rhs)
Scalar subtraction.
-
elemAdd
public Vector6Df elemAdd(float rhs)
Scalar addition.
-
norm2
public float norm2()
Returns the Euclidean norm (2-norm) of the VectorND- Returns:
- the norm
-
norm1
public float norm1()
Returns the Manhatten norm (1-norm) of the VectorND- Returns:
- the norm
-
normInf
public float normInf()
Returns the infinte norm ( \inf-norm) of the VectorND- Returns:
- the norm
-
dot
public double dot(Vector6Df vec)
calculate the dot product- Parameters:
vec
- [in] the vecor to be dotted- Returns:
- the dot product
-
normalize
public Vector6Df normalize()
normalize vector to get length 1- Returns:
- the normalized Vector
-
get
public float get(long i)
-
set
public void set(long i, float d)
-
e
public EigenVector6f e()
Accessor for the internal Eigen VectorND.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStdVector
public vector_f toStdVector()
converts the vector to a std:vector- Returns:
- a std::vector
-
multiplyAssign
public Vector6Df multiplyAssign(double s)
Scalar multiplication.
-
devideAssign
public Vector6Df devideAssign(double s)
Scalar division.
-
equals
public boolean equals(Vector6Df rhs)
Compare with rhs for equality.- Parameters:
rhs
- [in] other vector.- Returns:
- True if this equals rhs, false otherwise.
-
notEqual
public boolean notEqual(Vector6Df rhs)
Compare with rhs for inequality.- Parameters:
rhs
- [in] other vector.- Returns:
- True if this and rhs are different, false otherwise.
-
zero
public static Vector6Df zero()
Get zero-initialized vector.- Returns:
- vector.
-
-