YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Math.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_MATH_MATH_H
8#define YARP_MATH_MATH_H
9
10#include <yarp/sig/Vector.h>
11#include <yarp/sig/Matrix.h>
12#include <yarp/math/api.h>
14
24
30
36
41
46
51
56
62
68
74
79
84
89
94
102
110
118
126 const yarp::sig::Matrix &m);
127
135
143 const yarp::sig::Vector &a);
144
152
160
168
176
184
192
200
209
217
225
233
241
249
257
258
259namespace yarp::math {
267
275
283
291
299
307
315
323
331
339
346YARP_math_API yarp::sig::Vector cat(double s1, double s2);
347
348YARP_math_API yarp::sig::Vector cat(double s1, double s2, double s3);
349
350YARP_math_API yarp::sig::Vector cat(double s1, double s2, double s3, double s4);
351
352YARP_math_API yarp::sig::Vector cat(double s1, double s2, double s3, double s4, double s5);
353
358YARP_math_API double dot(const yarp::sig::Vector& a, const yarp::sig::Vector& b);
359
365
373
380
388
394YARP_math_API double norm(const yarp::sig::Vector& v);
395
401YARP_math_API double norm2(const yarp::sig::Vector& v);
402
409
416
423
430
438
445
452
457YARP_math_API double det(const yarp::sig::Matrix& in);
458
465
474
480// YARP_math_API yarp::sig::Matrix chinv(const yarp::sig::Matrix& in);
481
488YARP_math_API double sign(const double& v);
489
498
506
515
527
542
554
570
582
598
607
616
626} // namespace yarp::math
627
628#endif // YARP_MATH_MATH_H
yarp::sig::Vector & operator*=(yarp::sig::Vector &b, double k)
Vector-scalar product operator (defined in Math.h).
Definition math.cpp:154
yarp::sig::Vector operator+(const yarp::sig::Vector &a, const double &s)
Mathematical operations.
Definition math.cpp:27
yarp::sig::Vector & operator-=(yarp::sig::Vector &a, const double &s)
Subtraction operator between a vector and a scalar (defined in Math.h).
Definition math.cpp:98
yarp::sig::Vector & operator/=(yarp::sig::Vector &a, const yarp::sig::Vector &b)
Vector-vector element-wise division operator (defined in Math.h).
Definition math.cpp:266
yarp::sig::Vector operator-(const yarp::sig::Vector &a, const double &s)
Subtraction operator between a vector and a scalar (defined in Math.h).
Definition math.cpp:82
yarp::sig::Vector operator/(const yarp::sig::Vector &a, const yarp::sig::Vector &b)
Vector-vector element-wise division operator (defined in Math.h).
Definition math.cpp:260
yarp::sig::Vector & operator+=(yarp::sig::Vector &a, const double &s)
Addition operator between a scalar and a vector (defined in Math.h).
Definition math.cpp:38
yarp::sig::Vector operator*(double k, const yarp::sig::Vector &b)
Scalar-vector product operator (defined in Math.h).
Definition math.cpp:143
contains the definition of a Matrix type
contains the definition of a Vector type
A class for a Matrix.
Definition Matrix.h:39
yarp::sig::Matrix eye(int r, int c)
Build an identity matrix (defined in Math.h).
Definition math.cpp:586
yarp::sig::Matrix cat(const yarp::sig::Matrix &m1, const yarp::sig::Matrix &m2)
Matrix-Matrix concatenation by row (defined in Math.h).
Definition math.cpp:363
double norm(const yarp::sig::Vector &v)
Returns the Euclidean norm of the vector (defined in Math.h).
Definition math.cpp:538
yarp::sig::Vector cross(const yarp::sig::Vector &a, const yarp::sig::Vector &b)
Compute the cross product between two vectors (defined in Math.h).
Definition math.cpp:496
yarp::sig::Vector ones(int s)
Creates a vector of ones (defined in Math.h).
Definition math.cpp:581
yarp::sig::Vector dcm2ypr(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix to yaw-roll-pitch angles (defined in Math....
Definition math.cpp:863
bool eigenValues(const yarp::sig::Matrix &in, yarp::sig::Vector &real, yarp::sig::Vector &img)
Computes eigenvalues of the n-by-n real nonsymmetric matrix (defined in Math.h).
Definition math.cpp:624
yarp::sig::Matrix crossProductMatrix(const yarp::sig::Vector &v)
Compute the cross product matrix, that is a 3-by-3 skew-symmetric matrix (defined in Math....
Definition math.cpp:507
double norm2(const yarp::sig::Vector &v)
Returns the Euclidean squared norm of the vector (defined in Math.h).
Definition math.cpp:543
double det(const yarp::sig::Matrix &in)
Computes the determinant of a matrix (defined in Math.h).
Definition math.cpp:607
yarp::sig::Matrix SE3inv(const yarp::sig::Matrix &H)
Returns the inverse of a 4 by 4 rototranslational matrix (defined in Math.h).
Definition math.cpp:912
yarp::sig::Matrix adjointInv(const yarp::sig::Matrix &H)
Returns the inverse of the adjoint matrix of a given roto-translational matrix (defined in Math....
Definition math.cpp:959
yarp::sig::Vector zeros(int s)
Creates a vector of zeros (defined in Math.h).
Definition math.cpp:576
double findMax(const yarp::sig::Vector &v)
Returns the maximum of the elements of a real vector (defined in Math.h).
Definition math.cpp:548
yarp::sig::Matrix rpy2dcm(const yarp::sig::Vector &rpy)
Converts roll-pitch-yaw angles in the corresponding dcm (direction cosine matrix) rotation matrix (de...
Definition math.cpp:847
double sign(const double &v)
Invert a symmetric and positive definite matrix using Cholesky decomposition (defined in Math....
Definition math.cpp:657
double findMin(const yarp::sig::Vector &v)
Returns the minimum of the elements of a real vector (defined in Math.h).
Definition math.cpp:562
yarp::sig::Matrix adjoint(const yarp::sig::Matrix &H)
Returns the adjoint matrix of a given roto-translational matrix (defined in Math.h).
Definition math.cpp:933
yarp::sig::Matrix ypr2dcm(const yarp::sig::Vector &ypr)
Converts yaw-pitch-roll angles in the corresponding dcm (direction cosine matrix) rotation matrix (de...
Definition math.cpp:896
double dot(const yarp::sig::Vector &a, const yarp::sig::Vector &b)
Scalar product between vectors (defined in Math.h).
Definition math.cpp:475
yarp::sig::Vector dcm2euler(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix to euler angles (ZYZ) (defined in Math....
Definition math.cpp:753
yarp::sig::Matrix axis2dcm(const yarp::sig::Vector &v)
Returns a dcm (direction cosine matrix) rotation matrix R from axis/angle representation (defined in ...
Definition math.cpp:715
yarp::sig::Matrix luinv(const yarp::sig::Matrix &in)
Invert a square matrix using LU-decomposition (defined in Math.h).
Definition math.cpp:612
yarp::sig::Matrix euler2dcm(const yarp::sig::Vector &euler)
Converts euler angles (ZYZ) vector in the corresponding dcm (direction cosine matrix) rotation matrix...
Definition math.cpp:792
yarp::sig::Vector dcm2rpy(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix to roll-pitch-yaw angles (defined in Math....
Definition math.cpp:808
yarp::sig::Matrix outerProduct(const yarp::sig::Vector &a, const yarp::sig::Vector &b)
Outer product between vectors (defined in Math.h).
Definition math.cpp:483
yarp::sig::Matrix pile(const yarp::sig::Matrix &m1, const yarp::sig::Matrix &m2)
Matrix-Matrix concatenation by column (defined in Math.h).
Definition math.cpp:311
yarp::sig::Vector dcm2axis(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix R to axis/angle representation (defined in M...
Definition math.cpp:673
#define YARP_math_API
Definition api.h:17