Configuration vector.
More...
#include <Vector.hpp>
|
typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > | Base |
| The type of the internal Eigen vector implementation.
|
|
|
(Note that these are not member functions.)
|
template<class A > |
bool | operator== (const Vector< A > &q1, const Vector< A > &q2) |
| Compares q1 and q2 for equality. More...
|
|
template<class A > |
std::ostream & | operator<< (std::ostream &out, const Vector< A > &v) |
| Streaming operator.
|
|
template<class A > |
std::istream & | operator>> (std::istream &in, Vector< A > &q) |
| Input streaming operator. More...
|
|
template<class A > |
A | dot (const Vector< A > &a, const Vector< A > &b) |
| The dot product (inner product) of a and b.
|
|
template<class T = double>
class rw::math::Vector< T >
Configuration vector.
◆ Vector() [1/4]
Default constructor.
The vector will be of dimension zero.
◆ Vector() [2/4]
Vector |
( |
size_t |
n, |
|
|
const T * |
values |
|
) |
| |
|
inline |
Creates a Vector of length n and initialized with values from values.
The method reads n values from values and do not check whether reading out of bounds.
- Parameters
-
n | [in] Length of q. |
values | [in] Values to initialize with |
◆ Vector() [3/4]
Creates a Vector of length n and initialize all values in Vector to value.
- Parameters
-
n | [in] Length of q. |
value | [in] Value to initialize |
◆ Vector() [4/4]
Vector |
( |
const Eigen::MatrixBase< R > & |
r | ) |
|
|
inlineexplicit |
Construct a configuration vector from a Boost vector expression.
- Parameters
-
r | [in] An expression for a vector of doubles |
◆ getSubPart()
const Vector getSubPart |
( |
size_t |
start, |
|
|
size_t |
cnt |
|
) |
| const |
|
inline |
Start of sequence iterator.
End of sequence iterator.
Start of sequence iterator.
End of sequence iterator.
Extracts a sub part (range) of this Vector.
- Parameters
-
start | [in] Start index |
cnt | [in] the number of elements to include |
- Returns
◆ norm1()
Returns the Manhatten norm (1-norm) of the configuration.
- Returns
- the norm
◆ norm2()
Returns the Euclidean norm (2-norm) of the configuration.
- Returns
- the norm
◆ normInf()
Returns the infinte norm ( \(\inf\)-norm) of the configuration.
- Returns
- the norm
◆ operator()() [1/2]
T& operator() |
( |
size_t |
i | ) |
|
|
inline |
Returns reference to vector element.
- Parameters
-
i | [in] index in the vector |
- Returns
- reference to element
◆ operator()() [2/2]
const T& operator() |
( |
size_t |
i | ) |
const |
|
inline |
Returns reference to vector element.
- Parameters
-
i | [in] index in the vector |
- Returns
- const reference to element
◆ operator<()
bool operator< |
( |
const Vector< T > & |
q | ) |
const |
|
inline |
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.
◆ operator[]() [1/2]
T& operator[] |
( |
size_t |
i | ) |
|
|
inline |
Returns reference to vector element.
- Parameters
-
i | [in] index in the vector |
- Returns
- reference to element
◆ operator[]() [2/2]
const T& operator[] |
( |
size_t |
i | ) |
const |
|
inline |
Returns reference to vector element.
- Parameters
-
i | [in] index in the vector |
- Returns
- const reference to element
◆ setSubPart()
void setSubPart |
( |
size_t |
index, |
|
|
const Vector< T > & |
part |
|
) |
| |
|
inline |
Set a part of the vector.
- Parameters
-
index | [in] first index. |
part | [in] the subpart to set. |
◆ operator==()
bool operator== |
( |
const Vector< A > & |
q1, |
|
|
const Vector< A > & |
q2 |
|
) |
| |
|
related |
Compares q1 and q2 for equality.
q1 and q2 are considered equal if and only if they have equal length and if q1(i) == q2(i) for all i.
- Parameters
-
- Returns
- True if q1 equals q2, false otherwise.
◆ operator>>()
std::istream & operator>> |
( |
std::istream & |
in, |
|
|
Vector< A > & |
q |
|
) |
| |
|
related |
Input streaming operator.
Parse input stream according to how operator<< streams out
- Parameters
-
in | [in] Input stream |
q | [in] Target of q read in |
- Returns
- reference to in
The documentation for this class was generated from the following files: