iCub-main
Loading...
Searching...
No Matches
Namespaces | Functions
Math.cpp File Reference
#include <cassert>
#include <stdexcept>
#include <cmath>
#include <gsl/gsl_blas.h>
#include <yarp/gsl/Gsl.h>
#include "iCub/learningMachine/Math.h"
+ Include dependency graph for Math.cpp:

Go to the source code of this file.

Namespaces

namespace  iCub
 This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
 
namespace  iCub::learningmachine
 
namespace  iCub::learningmachine::math
 

Functions

void iCub::learningmachine::math::dchud (double *r, int ldr, int p, double *x, double *z, int ldz, int nz, double *y, double *rho, double *c, double *s, unsigned char rtrans=0, unsigned char ztrans=0)
 Mathematical helper functions for use in the learningMachine library.
 
void iCub::learningmachine::math::gsl_linalg_cholesky_update (gsl_matrix *R, gsl_vector *x, gsl_vector *c, gsl_vector *s, gsl_matrix *Z=NULL, gsl_vector *y=NULL, gsl_vector *rho=NULL, unsigned char rtrans=0, unsigned char ztrans=0)
 
void iCub::learningmachine::math::cholupdate (yarp::sig::Matrix &R, const yarp::sig::Vector &x, yarp::sig::Vector &c, yarp::sig::Vector &s, yarp::sig::Matrix &Z, const yarp::sig::Vector &y, yarp::sig::Vector &rho, bool rtrans=0, bool ztrans=0)
 Perform a rank-1 update to a Cholesky factor, while updating additional vectors using the used Given's rotations and updating the norm of residuals.
 
void iCub::learningmachine::math::cholupdate (yarp::sig::Matrix &R, const yarp::sig::Vector &x, bool rtrans=0)
 Perform a rank-1 update to a Cholesky factor.
 
void iCub::learningmachine::math::cholsolve (const yarp::sig::Matrix &R, const yarp::sig::Matrix &B, yarp::sig::Matrix &X)
 Solves a system A*x=b for multiple row vectors in B using a precomputed Cholesky factor R.
 
yarp::sig::Matrix iCub::learningmachine::math::cholsolve (const yarp::sig::Matrix &R, const yarp::sig::Matrix &B)
 Solves a system A*x=b for multiple row vectors in B using a precomputed Cholesky factor R.
 
void iCub::learningmachine::math::cholsolve (const yarp::sig::Matrix &R, const yarp::sig::Vector &b, yarp::sig::Vector &x)
 Solves a system A*x=b for using a precomputed Cholesky factor R.
 
yarp::sig::Vector iCub::learningmachine::math::cholsolve (const yarp::sig::Matrix &R, const yarp::sig::Vector &b)
 Solves a system A*x=b for using a precomputed Cholesky factor R.
 
yarp::sig::Matrix iCub::learningmachine::math::outerprod (const yarp::sig::Vector &v1, const yarp::sig::Vector &v2)
 Computes the outer product of two vectors.
 
yarp::sig::Vector & iCub::learningmachine::math::addvec (yarp::sig::Vector &v, double val)
 Adds a scalar to a vector inplace.
 
void iCub::learningmachine::math::trsolve (const yarp::sig::Matrix &A, const yarp::sig::Vector &b, yarp::sig::Vector &x, bool transa=false)
 Solves a triangular linear system Ax=b where A is triangular.
 
yarp::sig::Vector iCub::learningmachine::math::trsolve (const yarp::sig::Matrix &A, const yarp::sig::Vector &b, bool transa=false)
 Solves a linear system Ax=b where A is triangular.
 
void iCub::learningmachine::math::fillrandom (yarp::sig::Vector &v, yarp::math::RandScalar &prng)
 Fills an entire vector using the provided pseudo random number generator.
 
void iCub::learningmachine::math::fillrandom (yarp::sig::Matrix &M, yarp::math::RandScalar &prng)
 Fills an entire matrix using the provided pseudo random number generator.
 
void iCub::learningmachine::math::fillrandom (yarp::sig::Vector &v, yarp::math::RandnScalar &prng)
 Fills an entire vector using the provided pseudo random number generator.
 
void iCub::learningmachine::math::fillrandom (yarp::sig::Matrix &M, yarp::math::RandnScalar &prng)
 Fills an entire matrix using the provided pseudo random number generator.
 
yarp::sig::Vector iCub::learningmachine::math::random (int length, yarp::math::RandScalar &prng)
 Returns a random vector with given dimensionality.
 
yarp::sig::Matrix iCub::learningmachine::math::random (int rows, int columns, yarp::math::RandScalar &prng)
 Returns a random matrix with given dimensionality.
 
yarp::sig::Vector iCub::learningmachine::math::random (int length, yarp::math::RandnScalar &prng)
 Returns a random vector with given dimensionality.
 
yarp::sig::Matrix iCub::learningmachine::math::random (int rows, int columns, yarp::math::RandnScalar &prng)
 Returns a random matrix with given dimensionality.
 
yarp::sig::Vector & iCub::learningmachine::math::map (yarp::sig::Vector &v, double(op)(double))
 Performs a unary operator inplace on each element of a vector.
 
yarp::sig::Matrix & iCub::learningmachine::math::map (yarp::sig::Matrix &M, double(op)(double))
 Performs a unary operator inplace on each element of a matrix.
 
yarp::sig::Vector iCub::learningmachine::math::map (const yarp::sig::Vector &v, double(op)(double))
 Performs a unary operator on each element of a vector.
 
yarp::sig::Matrix iCub::learningmachine::math::map (const yarp::sig::Matrix &M, double(op)(double))
 Performs a unary operator on each element of a matrix.
 
yarp::sig::Vector & iCub::learningmachine::math::cosvec (yarp::sig::Vector &v)
 Computes the cosine of a vector element-wise inplace.
 
yarp::sig::Vector & iCub::learningmachine::math::sinvec (yarp::sig::Vector &v)
 Computes the sine of a vector element-wise inplace.
 
yarp::sig::Matrix & iCub::learningmachine::math::cosmat (yarp::sig::Matrix &M)
 Computes the cosine of a matrix element-wise inplace.
 
yarp::sig::Matrix & iCub::learningmachine::math::sinmat (yarp::sig::Matrix &M)
 Computes the sine of a matrix element-wise inplace.
 
yarp::sig::Vector iCub::learningmachine::math::cosvec (const yarp::sig::Vector &v)
 Computes the cosine of a vector element-wise.
 
yarp::sig::Vector iCub::learningmachine::math::sinvec (const yarp::sig::Vector &v)
 Computes the sine of a vector element-wise.
 
yarp::sig::Matrix iCub::learningmachine::math::cosmat (const yarp::sig::Matrix &M)
 Computes the cosine of a matrix element-wise.
 
yarp::sig::Matrix iCub::learningmachine::math::sinmat (const yarp::sig::Matrix &M)
 Computes the sine of a matrix element-wise.