Package org.robwork.sdurw_math
Class Vector5Df
- java.lang.Object
-
- org.robwork.sdurw_common.Serializable
-
- org.robwork.sdurw_math.Vector5Df
-
public class Vector5Df extends Serializable
A N-Dimensional Vector
-
-
Constructor Summary
Constructors Constructor Description Vector5Df(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector5Dfadd(Vector5Df rhs)Vector addition.Vector5DfaddAssign(Vector5Df v)Vector addition.voiddelete()Vector5DfdevideAssign(double s)Scalar division.Vector5Dfdivide(float rhs)Scalar division.doubledot(Vector5Df vec)calculate the dot productSWIGTYPE_p_Eigen__MatrixT_float_5_1_te()Accessor for the internal Eigen VectorND.Vector5DfelemAdd(float rhs)Scalar addition.Vector5DfelemDivide(Vector5Df rhs)element wise division.Vector5DfelemMultiply(Vector5Df rhs)Elementweise multiplication.Vector5DfelemSubtract(float rhs)Scalar subtraction.booleanequals(Vector5Df rhs)Compare with rhs for equality.floatget(long i)static longgetCPtr(Vector5Df obj)Vector5Dfmultiply(float rhs)Scalar multiplication.Vector5DfmultiplyAssign(double s)Scalar multiplication.Vector5Dfnegate()Unary minus.
negative versionfloatnorm1()Returns the Manhatten norm (1-norm) of the VectorNDfloatnorm2()Returns the Euclidean norm (2-norm) of the VectorNDVector5Dfnormalize()normalize vector to get length 1floatnormInf()Returns the infinte norm ( \inf-norm) of the VectorNDbooleannotEqual(Vector5Df rhs)Compare with rhs for inequality.voidset(long i, float d)longsize()The dimension of the VectorND (i.e.Vector5Dfsubtract(Vector5Df rhs)Vector subtraction.Vector5DfsubtractAssign(Vector5Df v)Vector subtraction.vector_ftoStdVector()converts the vector to a std:vectorjava.lang.StringtoString()static Vector5Dfzero()Get zero-initialized vector.-
Methods inherited from class org.robwork.sdurw_common.Serializable
getCPtr, read, write
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Vector5Df obj)
-
delete
public void delete()
- Overrides:
deletein 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 Vector5Df elemDivide(Vector5Df rhs)
element wise division.- Parameters:
rhs- [in] the vector being devided with- Returns:
- the resulting Vector3D
-
elemMultiply
public Vector5Df elemMultiply(Vector5Df rhs)
Elementweise multiplication.- Parameters:
rhs- [in] vector- Returns:
- the element wise product
-
negate
public Vector5Df negate()
Unary minus.
negative version
-
divide
public Vector5Df divide(float rhs)
Scalar division.- Parameters:
rhs- [in] the scalar to devide with- Returns:
- result of devision
-
multiply
public Vector5Df multiply(float rhs)
Scalar multiplication.- Parameters:
rhs- [in] the scalar to multiply with- Returns:
- the product
-
elemSubtract
public Vector5Df elemSubtract(float rhs)
Scalar subtraction.
-
elemAdd
public Vector5Df 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(Vector5Df vec)
calculate the dot product- Parameters:
vec- [in] the vecor to be dotted- Returns:
- the dot product
-
normalize
public Vector5Df 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 SWIGTYPE_p_Eigen__MatrixT_float_5_1_t e()
Accessor for the internal Eigen VectorND.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStdVector
public vector_f toStdVector()
converts the vector to a std:vector- Returns:
- a std::vector
-
multiplyAssign
public Vector5Df multiplyAssign(double s)
Scalar multiplication.
-
devideAssign
public Vector5Df devideAssign(double s)
Scalar division.
-
equals
public boolean equals(Vector5Df rhs)
Compare with rhs for equality.- Parameters:
rhs- [in] other vector.- Returns:
- True if this equals rhs, false otherwise.
-
notEqual
public boolean notEqual(Vector5Df rhs)
Compare with rhs for inequality.- Parameters:
rhs- [in] other vector.- Returns:
- True if this and rhs are different, false otherwise.
-
zero
public static Vector5Df zero()
Get zero-initialized vector.- Returns:
- vector.
-
-