Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "../config.h"
00021 #ifdef __MATRIXWRAPPER_LTI__
00022
00023 #ifndef __MATRIX_LTI__
00024 #define __MATRIX_LTI__
00025
00026 #include "matrix_wrapper.h"
00027 #include "vector_wrapper.h"
00028 #include <ltilib/ltiMatrix.h>
00029 #include <assert.h>
00030
00031
00032
00033
00034
00035 #define ltiMatrix lti::matrix<double>
00036 #define ltiSymmetricMatrix lti::matrix<double>
00037 #define ltiColumnVector lti::vector<double>
00038
00040 class MyMatrix : public ltiMatrix, public MatrixWrapper::Matrix_Wrapper
00041 {
00042 private:
00043
00044 public:
00045
00047 Matrix();
00048
00050 Matrix(int m, int n);
00051
00053 virtual ~Matrix();
00054
00056 Matrix (const MyMatrix& a);
00057
00059 Matrix(const ltiMatrix & a);
00060
00061 virtual unsigned int rows() const;
00062 virtual unsigned int columns() const;
00063 virtual double& operator()(unsigned int,unsigned int);
00064 virtual const double operator()(unsigned int,unsigned int) const;
00065 virtual const bool operator==(const MyMatrix& a) const;
00066
00067 virtual MyMatrix& operator =(double a);
00068
00069 virtual MyMatrix& operator +=(double a);
00070 virtual MyMatrix& operator -=(double a);
00071 virtual MyMatrix& operator *=(double b);
00072 virtual MyMatrix& operator /=(double b);
00073 virtual MyMatrix operator+ (double b) const;
00074 virtual MyMatrix operator- (double b) const;
00075 virtual MyMatrix operator* (double b) const;
00076 virtual MyMatrix operator/ (double b) const;
00077
00078 virtual MyMatrix& operator =(const MySymmetricMatrix& a);
00079 virtual MyMatrix& operator +=(const MyMatrix& a);
00080 virtual MyMatrix& operator -=(const MyMatrix& a);
00081 virtual MyMatrix operator+ (const MyMatrix &a) const;
00082 virtual MyMatrix operator- (const MyMatrix &a) const;
00083 virtual MyMatrix operator* (const MyMatrix &a) const;
00084
00085 virtual MyColumnVector operator* ( const MyColumnVector &b) const;
00086
00087 virtual MyRowVector rowCopy(unsigned int r) const;
00088 virtual MyColumnVector columnCopy(unsigned int c) const;
00089
00090 virtual void resize(unsigned int i, unsigned int j,
00091 bool copy=true, bool initialize=true);
00092 virtual MyMatrix inverse() const;
00093 virtual MyMatrix transpose() const;
00094 virtual double determinant() const;
00095 virtual int convertToSymmetricMatrix(MySymmetricMatrix& sym);
00096 virtual MyMatrix sub(int i_start, int i_end, int j_start , int j_end) const;
00097
00098 };
00099
00100
00101
00102 class MySymmetricMatrix : public ltiSymmetricMatrix, public SymmetricMatrix_Wrapper
00103 {
00104 public:
00105
00106 SymmetricMatrix();
00107 SymmetricMatrix(int n);
00108
00109
00110 SymmetricMatrix(const SymmetricMatrix& a);
00111 SymmetricMatrix(const ltiSymmetricMatrix & a);
00112
00113
00114 virtual ~SymmetricMatrix();
00115
00116
00117 virtual unsigned int rows() const;
00118 virtual unsigned int columns() const;
00119 virtual MySymmetricMatrix inverse() const;
00120 virtual MySymmetricMatrix transpose() const;
00121 virtual double determinant() const;
00122
00123 virtual double& operator()(unsigned int,unsigned int);
00124 virtual const double operator()(unsigned int,unsigned int) const;
00125 virtual const bool operator==(const MySymmetricMatrix& a) const;
00126
00127 virtual MySymmetricMatrix& operator=(double a);
00128
00129 virtual MySymmetricMatrix& operator +=(double a);
00130 virtual MySymmetricMatrix& operator -=(double a);
00131 virtual MySymmetricMatrix& operator *=(double b);
00132 virtual MySymmetricMatrix& operator /=(double b);
00133 virtual MySymmetricMatrix operator + (double b) const;
00134 virtual MySymmetricMatrix operator - (double b) const;
00135 virtual MySymmetricMatrix operator * (double b) const;
00136 virtual MySymmetricMatrix operator / (double b) const;
00137
00138 virtual MyMatrix& operator +=(const MyMatrix& a);
00139 virtual MyMatrix& operator -=(const MyMatrix& a);
00140 virtual MyMatrix operator + (const MyMatrix &a) const;
00141 virtual MyMatrix operator - (const MyMatrix &a) const;
00142 virtual MyMatrix operator * (const MyMatrix &a) const;
00143
00144 virtual MySymmetricMatrix& operator +=(const MySymmetricMatrix& a);
00145 virtual MySymmetricMatrix& operator -=(const MySymmetricMatrix& a);
00146 virtual MySymmetricMatrix operator + (const MySymmetricMatrix &a) const;
00147 virtual MySymmetricMatrix operator - (const MySymmetricMatrix &a) const;
00148 virtual MyMatrix operator * (const MySymmetricMatrix& a) const;
00149
00150 virtual MyColumnVector operator* (const MyColumnVector &b) const;
00151
00152 virtual void resize(unsigned int i, bool copy=true, bool initialize=true);
00153 virtual MyMatrix sub(int i_start, int i_end, int j_start , int j_end) const;
00154
00155 };
00156
00157
00158 #endif
00159
00160 #endif
bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Fri Aug 28 2015 10:10:21