Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::utils::Vector Class Reference

Wrapper of the Eigen VectorXd. More...

#include <Vector.h>

Inheritance diagram for BIORBD_NAMESPACE::utils::Vector:
BIORBD_NAMESPACE::rigidbody::GeneralizedAcceleration BIORBD_NAMESPACE::rigidbody::GeneralizedCoordinates BIORBD_NAMESPACE::rigidbody::GeneralizedTorque BIORBD_NAMESPACE::rigidbody::GeneralizedVelocity

Public Member Functions

 Vector ()
 Construct vector.
 Vector (size_t size)
 Construct vector of dimension size.
 Vector (const Vector &other)
 Construct vector from Casadi vector.
 Vector (const RigidBodyDynamics::Math::VectorNd &other)
 Construct vector from Casadi vector.
 Vector (const Vector3d &other)
 Construct vector from Casadi matrix.
Scalar norm (size_t p=2, bool skipRoot=false) const
 Return the Euclidian p-norm of the vector.
Vector normGradient (size_t p=2, bool skipRoot=false)
 Return the gradient of the p-norm.
void operator= (const Vector &other)
 operator= For submatrices

Detailed Description

Wrapper of the Eigen VectorXd.

Definition at line 19 of file Vector.h.

Constructor & Destructor Documentation

◆ Vector() [1/5]

utils::Vector::Vector ( )

Construct vector.

Definition at line 10 of file Vector.cpp.

◆ Vector() [2/5]

utils::Vector::Vector ( size_t size)

Construct vector of dimension size.

Parameters
sizeThe length of the vector

Definition at line 12 of file Vector.cpp.

◆ Vector() [3/5]

utils::Vector::Vector ( const Vector & other)

Construct vector from Casadi vector.

Parameters
otherThe vector to copy

Definition at line 15 of file Vector.cpp.

◆ Vector() [4/5]

utils::Vector::Vector ( const RigidBodyDynamics::Math::VectorNd & other)

Construct vector from Casadi vector.

Parameters
otherThe vector to copy

Definition at line 18 of file Vector.cpp.

◆ Vector() [5/5]

utils::Vector::Vector ( const Vector3d & other)

Construct vector from Casadi matrix.

Parameters
otherThe vector to copy

Definition at line 21 of file Vector.cpp.

Member Function Documentation

◆ norm()

utils::Scalar utils::Vector::norm ( size_t p = 2,
bool skipRoot = false ) const

Return the Euclidian p-norm of the vector.

Parameters
pthe factor of the p-norm
skipRootTo perform or not the sqrt_p()
Returns
The norm of the vector

Definition at line 34 of file Vector.cpp.

◆ normGradient()

utils::Vector utils::Vector::normGradient ( size_t p = 2,
bool skipRoot = false )

Return the gradient of the p-norm.

Parameters
pthe factor of the p-norm
skipRootTo perform or not the sqrt_p(), that is the gradient of \(\sum |x_i|^p\) if true or of \((\sum |x_i|^p)^{1/p}\) if false
Returns
The gradient of the norm

Definition at line 57 of file Vector.cpp.

◆ operator=()

void utils::Vector::operator= ( const Vector & other)

operator= For submatrices

Parameters
otherThe vector to copy

Definition at line 83 of file Vector.cpp.


The documentation for this class was generated from the following files: