Package org.robwork.sdurw_math
Class Q
- java.lang.Object
-
- org.robwork.sdurw_math.Q
-
public class Q extends java.lang.Object
Configuration vector
-
-
Constructor Summary
Constructors Constructor Description Q()
Default constructor.
The vector will be of dimension zero.Q(double arg0)
Q(double arg0, double arg1)
Q(double arg0, double arg1, double arg2)
Q(double arg0, double arg1, double arg2, double arg3)
Q(double arg0, double arg1, double arg2, double arg3, double arg4)
Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6)
Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7)
Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8)
Q(int arg0, double arg1)
Q(int arg0, double arg1, double arg2)
Q(int arg0, double arg1, double arg2, double arg3)
Q(int arg0, double arg1, double arg2, double arg3, double arg4)
Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6)
Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7)
Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8)
Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9)
Q(long dim)
A configuration of vector of length dim.Q(long cPtr, boolean cMemoryOwn)
Q(vector_d r)
Construct a configuration vector from a std::vector
expression.
Q(Q q)
Q(SWIGTYPE_p_Eigen__MatrixT_double_Eigen__Dynamic_1_t q)
Construct from Eigen base.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Q
add(Q b)
Vector addition.Q
addAssign(Q v)
Vector addition.void
delete()
Q
devideAssign(double s)
Scalar division.Q
divide(double s)
Scalar division.SWIGTYPE_p_Eigen__MatrixT_double_Eigen__Dynamic_1_t
e()
Accessor for the internal Eigen vector state.boolean
empty()
True if the configuration is of dimension zero.boolean
equals(Q q2)
Compares this and q2 for equality.
this and q2 are considered equal if and only if they have equal
length and if q1(i) == q2(i) for all i.double
get(long i)
static long
getCPtr(Q obj)
Q
getSubPart(long start, long cnt)
Extracts a sub part (range) of this Q.boolean
leessThan(Q q)
Compares whether this is less than q
The less operator is defined such that the first index is the most significant.Q
multiply(double s)
Scalar multiplication.Q
multiplyAssign(double s)
Scalar multiplication.Q
negate()
Unary minus.double
norm1()
Returns the Manhatten norm (1-norm) of the configurationdouble
norm2()
Returns the Euclidean norm (2-norm) of the configurationdouble
normInf()
Returns the infinte norm ( \inf-norm) of the configurationboolean
notEqual(Q q2)
Inequality operator
The inverse of operator==().void
set(long i, double d)
void
setSubPart(long index, Q part)
Set subpart of vector.long
size()
The dimension of the configuration vector.Q
subtract(Q b)
Vector subtraction.Q
subtractAssign(Q v)
Vector subtraction.vector_d
toStdVector()
Convert to a standard vector.void
toStdVector(vector_d v)
Convert to a standard vector.java.lang.String
toString()
static Q
zero(long n)
Returns Q of length n initialized with 0's
-
-
-
Constructor Detail
-
Q
public Q(long cPtr, boolean cMemoryOwn)
-
Q
public Q(long dim)
A configuration of vector of length dim.
-
Q
public Q(Q q)
-
Q
public Q()
Default constructor.
The vector will be of dimension zero.
-
Q
public Q(vector_d r)
Construct a configuration vector from a std::vector
expression.
- Parameters:
r
- [in] An expression for a vector of doubles
-
Q
public Q(int arg0, double arg1)
-
Q
public Q(int arg0, double arg1, double arg2)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8)
-
Q
public Q(int arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9)
-
Q
public Q(double arg0)
-
Q
public Q(double arg0, double arg1)
-
Q
public Q(double arg0, double arg1, double arg2)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3, double arg4)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7)
-
Q
public Q(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8)
-
Q
public Q(SWIGTYPE_p_Eigen__MatrixT_double_Eigen__Dynamic_1_t q)
Construct from Eigen base.- Parameters:
q
- [in] Eigen base.
-
-
Method Detail
-
getCPtr
public static long getCPtr(Q obj)
-
delete
public void delete()
-
zero
public static Q zero(long n)
Returns Q of length n initialized with 0's
-
size
public long size()
The dimension of the configuration vector.
-
empty
public boolean empty()
True if the configuration is of dimension zero.
-
e
public SWIGTYPE_p_Eigen__MatrixT_double_Eigen__Dynamic_1_t e()
Accessor for the internal Eigen vector state.
-
getSubPart
public Q getSubPart(long start, long cnt)
Extracts a sub part (range) of this Q.- Parameters:
start
- [in] Start indexcnt
- [in] the number of elements to include- Returns:
-
setSubPart
public void setSubPart(long index, Q part)
Set subpart of vector.- Parameters:
index
- [in] the initial index.part
- [in] the part to insert beginning from index.
-
norm2
public double norm2()
Returns the Euclidean norm (2-norm) of the configuration- Returns:
- the norm
-
norm1
public double norm1()
Returns the Manhatten norm (1-norm) of the configuration- Returns:
- the norm
-
normInf
public double normInf()
Returns the infinte norm ( \inf-norm) of the configuration- Returns:
- the norm
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
divide
public Q divide(double s)
Scalar division.
-
multiply
public Q multiply(double s)
Scalar multiplication.
-
equals
public boolean equals(Q q2)
Compares this and q2 for equality.
this and q2 are considered equal if and only if they have equal
length and if q1(i) == q2(i) for all i.- Parameters:
q2
- [in]- Returns:
- True if this equals q2, false otherwise.
-
notEqual
public boolean notEqual(Q q2)
Inequality operator
The inverse of operator==().
-
multiplyAssign
public Q multiplyAssign(double s)
Scalar multiplication.
-
devideAssign
public Q devideAssign(double s)
Scalar division.
-
negate
public Q negate()
Unary minus.
-
leessThan
public boolean leessThan(Q q)
Compares whether this is less than q
The less operator is defined such that the first index is the most significant. That is
if (*this)[0] < q[0] then true is returned. If (*this)[0] > q[0] false is returned and
only if (*this)[0] == q[0] is the next index considered.
-
toStdVector
public void toStdVector(vector_d v)
Convert to a standard vector.- Parameters:
v
- [out] the result.
-
toStdVector
public vector_d toStdVector()
Convert to a standard vector.- Returns:
- the result.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-