controller_misc.h File Reference

#include <selforg/matrix.h>
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include "stl_adds.h"
#include "noisegenerator.h"
#include "inspectable.h"

Include dependency graph for controller_misc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T>
T sign (T v)
template<typename T>
T sqr (T v)
template<typename T>
T clip (T x, T lobound, T highbound)
double one_over (double x)
 calculates 1/x
double random_minusone_to_one (double)
 creates random number from -1 to 1
std::list< matrix::Dstore4x4AndDiagonal (const matrix::Matrix &m)
unsigned int store4x4AndDiagonal (const matrix::Matrix &m, matrix::D *buffer, unsigned int len)
unsigned int get4x4AndDiagonalSize (const matrix::Matrix &m)
std::list< Inspectable::iparamkeystore4x4AndDiagonalFieldNames (const matrix::Matrix &m, const char *matrixName)
unsigned int store4x4AndDiagonalFieldNames (const matrix::Matrix &m, const char *matrixName, char **keylist, unsigned int len)
std::list< Inspectable::iparamkeystoreMatrixFieldNames (const matrix::Matrix &m, const char *matrixName)
std::list< Inspectable::iparamkeystoreVectorFieldNames (const matrix::Matrix &m, const char *vectorName)
unsigned int storeMatrixFieldNames (const matrix::Matrix &m, const char *matrixName, char **keylist, unsigned int len)
unsigned int storeVectorFieldNames (const matrix::Matrix &m, const char *vectorName, char **keylist, unsigned int len)
bool storeMatrix (const matrix::Matrix &m, FILE *f)
 stores the Matrix into the given file stream (binary)
bool restoreMatrix (matrix::Matrix &m, FILE *f)
 reads a Matrix from the given file stream (binary)
matrix::Matrix noiseMatrix (unsigned int m, unsigned int n, NoiseGenerator &ng, double p1, double p2)
 returns a Matrix with values generated by the given noise generator
double matrixNorm1 (const matrix::Matrix &m)
 calculates to linear matrix norm (sum of absolute values devided by number of values (m*n) )
double adapt (double p, double actual, double nominal, double up_rate, double down_rate)
 parameter adaptation algorithm.
double adaptMinMax (double p, double actual, double _min, double _max, double up_rate, double down_rate)
 like adapt but that the adaption is just done if the actual value is outside the given interval (_min, _max)


Function Documentation

double adapt ( double  p,
double  actual,
double  nominal,
double  up_rate,
double  down_rate 
)

parameter adaptation algorithm.

double adaptMinMax ( double  p,
double  actual,
double  _min,
double  _max,
double  up_rate,
double  down_rate 
)

like adapt but that the adaption is just done if the actual value is outside the given interval (_min, _max)

T clip ( T  x,
T  lobound,
T  highbound 
) [inline]

unsigned int get4x4AndDiagonalSize ( const matrix::Matrix m  ) 

double matrixNorm1 ( const matrix::Matrix m  ) 

calculates to linear matrix norm (sum of absolute values devided by number of values (m*n) )

matrix::Matrix noiseMatrix ( unsigned int  m,
unsigned int  n,
NoiseGenerator ng,
double  p1,
double  p2 
)

returns a Matrix with values generated by the given noise generator

double one_over ( double  x  ) 

calculates 1/x

double random_minusone_to_one ( double   ) 

creates random number from -1 to 1

bool restoreMatrix ( matrix::Matrix m,
FILE *  f 
)

reads a Matrix from the given file stream (binary)

T sign ( T  v  )  [inline]

T sqr ( T  v  )  [inline]

unsigned int store4x4AndDiagonal ( const matrix::Matrix m,
matrix::D buffer,
unsigned int  len 
)

std::list<matrix::D> store4x4AndDiagonal ( const matrix::Matrix m  ) 

unsigned int store4x4AndDiagonalFieldNames ( const matrix::Matrix m,
const char *  matrixName,
char **  keylist,
unsigned int  len 
)

std::list<Inspectable::iparamkey> store4x4AndDiagonalFieldNames ( const matrix::Matrix m,
const char *  matrixName 
)

bool storeMatrix ( const matrix::Matrix m,
FILE *  f 
)

stores the Matrix into the given file stream (binary)

unsigned int storeMatrixFieldNames ( const matrix::Matrix m,
const char *  matrixName,
char **  keylist,
unsigned int  len 
)

std::list<Inspectable::iparamkey> storeMatrixFieldNames ( const matrix::Matrix m,
const char *  matrixName 
)

unsigned int storeVectorFieldNames ( const matrix::Matrix m,
const char *  vectorName,
char **  keylist,
unsigned int  len 
)

std::list<Inspectable::iparamkey> storeVectorFieldNames ( const matrix::Matrix m,
const char *  vectorName 
)


Generated on Mon Aug 7 16:42:08 2006 for Robotsystem of the Robot Group Leipzig by  doxygen 1.4.7