Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Math

The Math Library. More...

Compounds

class  Array< Type >
 This class is a generic template array class. More...

class  CoordinateSpace
 Specifies the properties of a coordinate space. More...

class  CoordinateVector
 Create a vector that has coordinate space information. More...

class  Diff
 A class for numerically computing derivatives. More...

class  DLSEqnSolver
 This class contains methods for calculating solutions to the linear system Ax=b. More...

class  EqnSolver
 This class contains methods for calculating solutions to the linear system Ax=b. More...

class  FixedSizeArray
 A template class that allows the creation of specific type arrays with a defined fixed size. More...

class  FixedSizeMatrix
 A template class that allows the creation of specific matrices with a defined fixed size. More...

class  HandPose
 Represents a 6 element vector whose 1st 3 elements hold the X,Y,Z positions and the last three hold the orientation. More...

class  JointVector
 Used to pass joint position values. More...

class  Matrix
 This class is a 2D array of doubles that contains the appropriate functionality for managing robotics data. More...

class  MatrixCol
 This class creates a pointer to a column in a Matrix. More...

class  MatrixRow
 This class creates a pointer to a row in a Matrix. More...

class  Orientation
 Represents a 3 long vector whose elements hold the spatial orientation. More...

class  Quaternion
 Used to reperesent a quaternion rotation. More...

class  RK4
 fixed step size Runge Kutta Integrator Used to integrate ODEs in a manner similar to ode45 in matlab More...

class  Rot3by3
 This class is used to represent a 3x3 rotation matrix. More...

class  SpatialXform
 This class represents a 6 by 6 spatial transformation matrix. More...

class  Tensor
 Represents a tensor (basically an array of matrices). More...

class  Vector3
 Represents a spatial position vector. More...

class  VectorArray
 Stores arrays of vectors. More...

class  VectorNumeric
 Represents a vector. More...

class  Xform
 Defines a 4 by 4 homogeneous transformation matrix. More...


Typedefs

typedef Array< enum CoordinateStatus > CoordinateStatusArray

Functions

Vector GetRow (unsigned int row, const Matrix &m)
Vector GetCol (unsigned int col, const Matrix &m)
void GetRow (Vector &result, unsigned int row, const Matrix &m)
void GetCol (Vector &result, unsigned int col, const Matrix &m)
Vector3 Cross3 (const Vector3 &v1, const Vector3 &v2)
Vector3 Cross3Unit (const Vector3 &v1, const Vector3 &v2)
Matrix operator * (double a, const Matrix &m)
Vector3 operator * (const Xform &lhs, const Vector3 &rhs)
void Multiply (const Xform &lhs, const Vector3 &rhs, Vector3 &result)
template<class Type> VectorNumeric< Type > operator * (Type a, const VectorNumeric< Type > &v)
template<class To, class From> To Convert (const From &f)
template<class Type> Type Dot (const VectorNumeric< Type > &v1, const VectorNumeric< Type > &v2)

Variables

const OSCARError MathErrors
const OSCARError mathDefinitionError
const OSCARError vectorSizeMismatch
const OSCARError matrixSizeMismatch
const OSCARError matrixRowSizeMismatch
const OSCARError matrixColumnSizeMismatch
const OSCARError matlabRelated
const OSCARError tensorArraySizeMismatch
const OSCARError tensorMatrixSizeMismatch
const OSCARError arraySizeMismatch
const OSCARError nonSquareMatrix
const OSCARError quaternionSingularity
const OSCARError invalidArraySize
const OSCARError outOfRange
const OSCARError limitsNotSet
const OSCARError limitsViolation
const OSCARError matrixSingularity
const OSCARError invalidValue
const OSCARError divideByZero
const OSCARError invalidRotationMatrix

Detailed Description

This library contains functionality for basic mathematics operations. These include linear algebra constructs (vector, matrix, tensor) and the mathematics associated with them (dot products, cross products, matrix inversion, etc). This library also contains various objects for spatial representations such as Euler Angles, Transformation Matrices, Quaternions, etc. Several numerical tools are also included such as GRG and a linear system solver.

Typedef Documentation

typedef Array<enum CoordinateStatus> OSCAR::CoordinateStatusArray
 

Array for holding coordinate status.


Function Documentation

template<class To, class From>
To Convert const From &    f
 

Convert between two types that have a Set() method defined HandPose handPose; example: Convert<Xform>(handPose) this example converts a handpose into an xform using Xforms Set() method.

Parameters:
f: the From template class is deduced from the argument passed
Returns:
An object of Type To derived from the From object passed
See also:
Xform::Set()

Set()

Vector3 Cross3 const Vector3   v1,
const Vector3   v2
 

Get the cross product of two Vector3 objects.

This method is used to get the cross product of two Vector3 objects. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
v1 An Vector3 object.
v2 An Vector3 object.
Returns:
The resulting Vector3 object.

Vector3 Cross3Unit const Vector3   v1,
const Vector3   v2
 

Get the cross unit product of two Vector3 objects.

This method is used to get the cross unit product of two Vector3 objects. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
v1 An Vector3 object.
v2 An Vector3 object.
Returns:
The resulting Vector3 object.

template<class Type>
Type Dot const VectorNumeric< Type > &    v1,
const VectorNumeric< Type > &    v2
 

Return the dot (inner) product between two VectorNumeric objects.

This method returns performs the dot product between vectors. Return value is sum over (i=0;i=min(size v1,size v2)) of v1.at(i)*rhs.at(i)

Returns:
Type containing the dot product

void GetCol Vector   result,
unsigned int    col,
const Matrix   m
 

Get an entire column of an Matrix object.

This method is used to get an entire column of an Matrix. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
result On return, result contains the column of the Matrix in an Vector form.
col The index of the column to get.
m An Matrix object.

Vector GetCol unsigned int    col,
const Matrix   m
 

Get an entire column of an Matrix object.

This method is used to get an entire column of an Matrix. The column is returned in an Vector form. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
col The index of the column to get.
m An Matrix object.
Returns:
An Vector containing the column.

void GetRow Vector   result,
unsigned int    row,
const Matrix   m
 

Get an entire row of an Matrix object.

This method is used to get an entire row of an Matrix. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
result On return, result contains the row of the Matrix in an Vector form.
row The index of the row to get.
m An Matrix object.

Vector GetRow unsigned int    row,
const Matrix   m
 

Get an entire row of an Matrix object.

This method is used to get an entire row of an Matrix. The row is returned in an Vector form. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
row The index of the row to get.
m An Matrix object.
Returns:
An Vector containing the row.

void Multiply const Xform   lhs,
const Vector3   rhs,
Vector3   result
 

Premultiply an Vector3 object by an Xform and place in result.

This method is used to premultiply an Vector3 object with an Xform without creating a temporary Vector3

Parameters:
lhs Xform object .
rhs An Vector3 object.
result The resulting Vector3 object.

template<class Type>
VectorNumeric<Type> operator * Type    a,
const VectorNumeric< Type > &    v
 

Multiply a scalar with an VectorNumeric object.

Used for multiplication of a scalar and an VectorNumeric object where the scalar is on the LHs

Parameters:
a A scalar quantity.
v An VectorNumeric object.
Returns:
The resulting Matrix object.

Vector3 operator * const Xform   lhs,
const Vector3   rhs
 

Premultiply an Vector3 object by an Xform.

This method is used to premultiply an Vector3 object with an Xform.

Parameters:
lhs Xform object .
rhs An Vector3 object.
Returns:
The resulting Vector3 object.

Matrix operator * double    a,
const Matrix   m
 

Multiply an Matrix object by a scalar.

This method is used to multiply an Matrix object with a scalar quantity. This method is also defined as extern so that it can be defined in multiple files.

Parameters:
a A scalar quantity.
m An Matrix object.
Returns:
The resulting Matrix object.


Variable Documentation

const OSCARError OSCAR::arraySizeMismatch
 

This indicates an error in the array size.

This indicates an error in the array size.

const OSCARError OSCAR::divideByZero
 

This indicates a division by zero for any of the math data types.

const OSCARError OSCAR::invalidArraySize
 

This indicates that the size of the array is invalid.

This indicates that the size of the array is invalid.

const OSCARError OSCAR::invalidRotationMatrix
 

This indicates that a rotation matrix (either a Rot3by3 or inside an Xform) is invalid, i.e. not orthonormal.

const OSCARError OSCAR::invalidValue
 

When an invalid value for a parameter is specified.

const OSCARError OSCAR::limitsNotSet
 

This indicates that the limits are not set.

This indicates that the limits are not set.

const OSCARError OSCAR::limitsViolation
 

This indicates that the limits are being violated.

This indicates that the limits are being violated.

const OSCARError OSCAR::mathDefinitionError
 

This indicates a Math Definition Error.

This indicates a Math Definition Error.

const OSCARError OSCAR::MathErrors
 

This indicates a Math Error.

This indicates a Math Error.

const OSCARError OSCAR::matlabRelated
 

This indicates an error related to matlab.

This indicates an error related to matlab.

const OSCARError OSCAR::matrixColumnSizeMismatch
 

This indicates an error in the column size of a matrix.

This indicates an error in the column size of a matrix.

const OSCARError OSCAR::matrixRowSizeMismatch
 

This indicates an error in the row size of a matrix.

This indicates an error in the row size of a matrix.

const OSCARError OSCAR::matrixSingularity
 

This indicates an error in singularity of a matrix.

This indicates an error in singularity of a matrix.

const OSCARError OSCAR::matrixSizeMismatch
 

This indicates an error in the size of a matrix.

This indicates an error in the size of a matrix.

const OSCARError OSCAR::nonSquareMatrix
 

This indicates that a matrix is not square..

This indicates that a matrix is not square.

const OSCARError OSCAR::outOfRange
 

This indicates an out of range error for an array.

This indicates an out of range error for an array.

const OSCARError OSCAR::quaternionSingularity
 

This indicates an error in the singularity of a quaternion.

This indicates an error in the singularity of a quaternion.

const OSCARError OSCAR::tensorArraySizeMismatch
 

This indicates an error in the tensor array size.

This indicates an error in the tensor array size.

const OSCARError OSCAR::tensorMatrixSizeMismatch
 

This indicates an error in the tensor matrix size.

This indicates an error in the tensor matrix size.

const OSCARError OSCAR::vectorSizeMismatch
 

This indicates an error in the size of a vector.

This indicates an error in the size of a vector.

RRG Homepage OSCAR Overview OSCAR Tutorials Simulations