Package org.robwork.sdurw
Class Vector3Dd
- java.lang.Object
-
- org.robwork.sdurw.Vector3Dd
-
public class Vector3Dd extends java.lang.ObjectA 3D vector \mathbf{v}\in \mathbb{R}^3
\robabx{i}{j}{\mathbf{v}} = \left[ \begin{array}{c} v_x \\ v_y \\ v_z \end{array} \right]
Usage example:
const Vector3Ddouble v1(1.0, 2.0, 3.0); const Vector3Ddouble v2(6.0, 7.0, 8.0); const Vector3Ddouble v3 = cross(v1, v2); const double d = dot(v1, v2); const Vector3Ddouble v4 = v2 - v1;
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3Ddadd(Vector3Dd other)Vector addition.voiddelete()Vector3Dddivide(double s)Scalar division.EigenVector3de()Returns Eigen vector with the values of *thisbooleanequals(Vector3Dd q)Compare with b for equality.
doubleget(long i)static longgetCPtr(Vector3Dd obj)Vector3Ddmultiply(double scale)Scalar multiplication.Vector3Ddnegate()Unary minus.doublenorm1()Returns the Manhatten norm (1-norm) of the vectordoublenorm2()Returns the Euclidean norm (2-norm) of the vectordoublenormInf()Returns the infinte norm ( \inf -norm) of the vectorvoidset(long i, double d)longsize()The dimension of the vector (i.e.Vector3Ddsubtract(Vector3Dd other)Vector subtraction.java.lang.StringtoString()static Vector3Ddx()Get x vector (1,0,0)static Vector3Ddy()Get y vector (0,1,0)static Vector3Ddz()Get z vector (0,0,1)static Vector3Ddzero()Get zero vector.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Vector3Dd obj)
-
delete
public void delete()
-
e
public EigenVector3d e()
Returns Eigen vector with the values of *this
-
size
public long size()
The dimension of the vector (i.e. 3).
This method is provided to help support generic algorithms using
size() and operator[].
-
divide
public Vector3Dd divide(double s)
Scalar division.
-
multiply
public Vector3Dd multiply(double scale)
Scalar multiplication.
-
negate
public Vector3Dd negate()
Unary minus.
-
equals
public boolean equals(Vector3Dd q)
Compare with b for equality.
- Returns:
- True if a equals b, false otherwise.
-
norm2
public double norm2()
Returns the Euclidean norm (2-norm) of the vector- Returns:
- the norm
-
norm1
public double norm1()
Returns the Manhatten norm (1-norm) of the vector- Returns:
- the norm
-
normInf
public double normInf()
Returns the infinte norm ( \inf -norm) of the vector- Returns:
- the norm
-
zero
public static Vector3Dd zero()
Get zero vector.- Returns:
- vector.
-
x
public static Vector3Dd x()
Get x vector (1,0,0)- Returns:
- vector.
-
y
public static Vector3Dd y()
Get y vector (0,1,0)- Returns:
- vector.
-
z
public static Vector3Dd z()
Get z vector (0,0,1)- Returns:
- vector.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
-