Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Vector.h
1
#ifndef BIORBD_UTILS_VECTOR_H
2
#define BIORBD_UTILS_VECTOR_H
3
4
#include "biorbdConfig.h"
5
6
#include "Utils/Scalar.h"
7
#include "rbdl/rbdl_math.h"
8
9
namespace
BIORBD_NAMESPACE {
10
namespace
utils {
11
class
Vector3d
;
12
16
#ifdef SWIG
17
class
BIORBD_API
Vector
18
#else
19
class BIORBD_API
Vector
:
public
RigidBodyDynamics::Math::VectorNd
20
#endif
21
{
22
public
:
26
Vector
();
27
32
Vector
(
size_t
size);
33
38
Vector
(
const
Vector
& other);
39
44
Vector
(
const
RigidBodyDynamics::Math::VectorNd& other);
45
50
Vector
(
const
Vector3d
& other);
51
52
#ifdef BIORBD_USE_EIGEN3_MATH
57
template
<
typename
OtherDerived>
58
Vector
(
const
Eigen::MatrixBase<OtherDerived>& other)
59
: Eigen::VectorXd(other) {}
60
#endif
61
62
#ifdef BIORBD_USE_CASADI_MATH
67
Vector
(
const
casadi::MX& other);
68
73
Vector
(
const
RBDLCasadiMath::MX_Xd_SubMatrix& other);
74
#endif
75
82
Scalar
norm
(
size_t
p = 2,
bool
skipRoot =
false
)
const
;
83
91
Vector
normGradient
(
size_t
p = 2,
bool
skipRoot =
false
);
92
93
#ifndef SWIG
98
void
operator=
(
const
Vector
& other);
99
#ifdef BIORBD_USE_EIGEN3_MATH
104
template
<
typename
OtherDerived>
105
Vector
&
operator=
(
const
Eigen::MatrixBase<OtherDerived>& other) {
106
this->Eigen::VectorXd::operator=(other);
107
return
*
this
;
108
}
109
#endif
110
#ifdef BIORBD_USE_CASADI_MATH
115
void
operator=
(
const
RBDLCasadiMath::MX_Xd_SubMatrix& other);
116
121
void
operator=
(
const
casadi::MX& other);
122
#endif
123
124
#endif
125
};
126
127
}
// namespace utils
128
}
// namespace BIORBD_NAMESPACE
129
130
#endif
// BIORBD_UTILS_VECTOR_H
BIORBD_NAMESPACE::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition
Vector3d.h:27
BIORBD_NAMESPACE::utils::Vector
Wrapper of the Eigen VectorXd.
Definition
Vector.h:21
BIORBD_NAMESPACE::utils::Vector::normGradient
Vector normGradient(size_t p=2, bool skipRoot=false)
Return the gradient of the p-norm.
Definition
Vector.cpp:57
BIORBD_NAMESPACE::utils::Vector::norm
Scalar norm(size_t p=2, bool skipRoot=false) const
Return the Euclidian p-norm of the vector.
Definition
Vector.cpp:34
BIORBD_NAMESPACE::utils::Vector::Vector
Vector()
Construct vector.
Definition
Vector.cpp:10
BIORBD_NAMESPACE::utils::Vector::operator=
void operator=(const Vector &other)
operator= For submatrices
Definition
Vector.cpp:83
include
Utils
Vector.h
Generated by
1.18.0