Package org.robwork.sdurw_math
Class Vector5Dd
- java.lang.Object
-
- org.robwork.sdurw_common.Serializable
-
- org.robwork.sdurw_math.Vector5Dd
-
public class Vector5Dd extends Serializable
A N-Dimensional Vector
-
-
Constructor Summary
Constructors Constructor Description Vector5Dd(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector5Ddadd(Vector5Dd rhs)Vector addition.Vector5DdaddAssign(Vector5Dd v)Vector addition.voiddelete()Vector5DddevideAssign(double s)Scalar division.Vector5Dddivide(double rhs)Scalar division.doubledot(Vector5Dd vec)calculate the dot productSWIGTYPE_p_Eigen__MatrixT_double_5_1_te()Accessor for the internal Eigen VectorND.Vector5DdelemAdd(double rhs)Scalar addition.Vector5DdelemDivide(Vector5Dd rhs)element wise division.Vector5DdelemMultiply(Vector5Dd rhs)Elementweise multiplication.Vector5DdelemSubtract(double rhs)Scalar subtraction.booleanequals(Vector5Dd rhs)Compare with rhs for equality.doubleget(long i)static longgetCPtr(Vector5Dd obj)Vector5Ddmultiply(double rhs)Scalar multiplication.Vector5DdmultiplyAssign(double s)Scalar multiplication.Vector5Ddnegate()Unary minus.
negative versiondoublenorm1()Returns the Manhatten norm (1-norm) of the VectorNDdoublenorm2()Returns the Euclidean norm (2-norm) of the VectorNDVector5Ddnormalize()normalize vector to get length 1doublenormInf()Returns the infinte norm ( \inf-norm) of the VectorNDbooleannotEqual(Vector5Dd rhs)Compare with rhs for inequality.voidset(long i, double d)longsize()The dimension of the VectorND (i.e.Vector5Ddsubtract(Vector5Dd rhs)Vector subtraction.Vector5DdsubtractAssign(Vector5Dd v)Vector subtraction.vector_dtoStdVector()converts the vector to a std:vectorjava.lang.StringtoString()static Vector5Ddzero()Get zero-initialized vector.-
Methods inherited from class org.robwork.sdurw_common.Serializable
getCPtr, read, write
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Vector5Dd 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 Vector5Dd elemDivide(Vector5Dd rhs)
element wise division.- Parameters:
rhs- [in] the vector being devided with- Returns:
- the resulting Vector3D
-
elemMultiply
public Vector5Dd elemMultiply(Vector5Dd rhs)
Elementweise multiplication.- Parameters:
rhs- [in] vector- Returns:
- the element wise product
-
negate
public Vector5Dd negate()
Unary minus.
negative version
-
divide
public Vector5Dd divide(double rhs)
Scalar division.- Parameters:
rhs- [in] the scalar to devide with- Returns:
- result of devision
-
multiply
public Vector5Dd multiply(double rhs)
Scalar multiplication.- Parameters:
rhs- [in] the scalar to multiply with- Returns:
- the product
-
elemSubtract
public Vector5Dd elemSubtract(double rhs)
Scalar subtraction.
-
elemAdd
public Vector5Dd elemAdd(double rhs)
Scalar addition.
-
norm2
public double norm2()
Returns the Euclidean norm (2-norm) of the VectorND- Returns:
- the norm
-
norm1
public double norm1()
Returns the Manhatten norm (1-norm) of the VectorND- Returns:
- the norm
-
normInf
public double normInf()
Returns the infinte norm ( \inf-norm) of the VectorND- Returns:
- the norm
-
dot
public double dot(Vector5Dd vec)
calculate the dot product- Parameters:
vec- [in] the vecor to be dotted- Returns:
- the dot product
-
normalize
public Vector5Dd normalize()
normalize vector to get length 1- Returns:
- the normalized Vector
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
e
public SWIGTYPE_p_Eigen__MatrixT_double_5_1_t e()
Accessor for the internal Eigen VectorND.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStdVector
public vector_d toStdVector()
converts the vector to a std:vector- Returns:
- a std::vector
-
multiplyAssign
public Vector5Dd multiplyAssign(double s)
Scalar multiplication.
-
devideAssign
public Vector5Dd devideAssign(double s)
Scalar division.
-
equals
public boolean equals(Vector5Dd rhs)
Compare with rhs for equality.- Parameters:
rhs- [in] other vector.- Returns:
- True if this equals rhs, false otherwise.
-
notEqual
public boolean notEqual(Vector5Dd rhs)
Compare with rhs for inequality.- Parameters:
rhs- [in] other vector.- Returns:
- True if this and rhs are different, false otherwise.
-
zero
public static Vector5Dd zero()
Get zero-initialized vector.- Returns:
- vector.
-
-