Biorbd
Public Member Functions | List of all members
biorbd::utils::Vector Class Reference

Wrapper of the Eigen VectorXd. More...

#include <Vector.h>

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

Public Member Functions

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

Detailed Description

Wrapper of the Eigen VectorXd.

Definition at line 18 of file Vector.h.

Constructor & Destructor Documentation

◆ Vector() [1/4]

biorbd::utils::Vector::Vector ( unsigned int  size)

Construct vector of dimension size.

Parameters
sizeThe length of the vector

Definition at line 14 of file Vector.cpp.

◆ Vector() [2/4]

biorbd::utils::Vector::Vector ( const biorbd::utils::Vector other)

Construct vector from Casadi vector.

Parameters
otherThe vector to copy

Definition at line 21 of file Vector.cpp.

◆ Vector() [3/4]

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

Construct vector from Casadi vector.

Parameters
otherThe vector to copy

Definition at line 28 of file Vector.cpp.

◆ Vector() [4/4]

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

Construct vector from Casadi matrix.

Parameters
otherThe vector to copy

Definition at line 35 of file Vector.cpp.

Member Function Documentation

◆ norm()

biorbd::utils::Scalar biorbd::utils::Vector::norm ( unsigned int  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 59 of file Vector.cpp.

◆ normGradient()

biorbd::utils::Vector biorbd::utils::Vector::normGradient ( unsigned int  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()
Returns
The gradient of the norm

Definition at line 82 of file Vector.cpp.

◆ operator=()

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

operator= For submatrices

Parameters
otherThe vector to copy

Definition at line 105 of file Vector.cpp.


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