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_NEWMAT__
00022
00023 #ifndef __VECTOR_NEWMAT__
00024 #define __VECTOR_NEWMAT__
00025
00026 #include "matrix_wrapper.h"
00027 #include "vector_wrapper.h"
00028 #include <newmat/newmatio.h>
00029 #include <assert.h>
00030
00031
00032 #define NewMatColumnVector NEWMAT::ColumnVector
00033 #define NewMatRowVector NEWMAT::RowVector
00034
00035 namespace MatrixWrapper
00036 {
00037
00039 class ColumnVector : public NewMatColumnVector, public ColumnVector_Wrapper
00040 {
00041 public:
00042
00044 ColumnVector();
00045
00047 ColumnVector(int nrows);
00048
00050 ColumnVector(const MyColumnVector& a, const MyColumnVector& b);
00051
00053 virtual ~ColumnVector();
00054
00056 ColumnVector (const MyColumnVector& a);
00057
00059 ColumnVector (const NewMatColumnVector& a);
00060
00061 virtual void resize(int num_rows);
00062 virtual unsigned int rows() const;
00063 virtual unsigned int columns() const;
00064 virtual ColumnVector vectorAdd(const MyColumnVector& v2) const;
00065 virtual ColumnVector& operator =(const MyColumnVector& a);
00066 virtual ColumnVector& operator =(double a);
00067 virtual const bool operator==(const MyColumnVector& a) const;
00068
00069 virtual MyColumnVector & operator+= (const MyColumnVector& a);
00070 virtual MyColumnVector & operator-= (const MyColumnVector& a);
00071 virtual MyColumnVector operator+ (const MyColumnVector &a) const;
00072 virtual MyColumnVector operator- (const MyColumnVector &a) const;
00073
00074 virtual MyColumnVector& operator+= (double b);
00075 virtual MyColumnVector& operator-= (double b);
00076 virtual MyColumnVector& operator*= (double b);
00077 virtual MyColumnVector& operator/= (double b);
00078 virtual MyColumnVector operator+ (double b) const;
00079 virtual MyColumnVector operator- (double b) const;
00080 virtual MyColumnVector operator* (double b) const;
00081 virtual MyColumnVector operator/ (double b) const;
00082
00083 virtual const double operator()(unsigned int) const;
00084 virtual double& operator()(unsigned int);
00085 virtual MyMatrix operator* (const MyRowVector &a) const;
00086 virtual MyColumnVector sub(int j_start , int j_end) const;
00087 virtual MyRowVector transpose() const;
00088
00089
00090 };
00091
00093 class RowVector : public NewMatRowVector, public RowVector_Wrapper
00094 {
00095
00096
00097
00098 public:
00099 RowVector();
00100 RowVector(int ncols);
00101
00102
00103
00104
00105 RowVector (const MyRowVector& a);
00106
00107 RowVector (const NewMatRowVector& a);
00108
00109 virtual ~RowVector();
00110
00111 virtual void resize(int num_cols);
00112 virtual RowVector vectorAdd(const MyRowVector& v2) const;
00113 virtual unsigned int rows() const;
00114 virtual unsigned int columns() const;
00115 virtual RowVector& operator =(double a);
00116 virtual RowVector& operator =(const MyRowVector& a);
00117 virtual const bool operator==(const MyRowVector& a) const;
00118
00119 virtual MyRowVector & operator+= (const MyRowVector& a);
00120 virtual MyRowVector & operator-= (const MyRowVector& a);
00121 virtual MyRowVector operator+ (const MyRowVector &a) const;
00122 virtual MyRowVector operator- (const MyRowVector &a) const;
00123
00124 virtual MyRowVector& operator+= (double b);
00125 virtual MyRowVector& operator-= (double b);
00126 virtual MyRowVector& operator*= (double b);
00127 virtual MyRowVector& operator/= (double b);
00128 virtual MyRowVector operator+ (double b) const;
00129 virtual MyRowVector operator- (double b) const;
00130 virtual MyRowVector operator* (double b) const;
00131 virtual MyRowVector operator/ (double b) const;
00132
00133 virtual const double operator()(unsigned int) const;
00134 virtual double& operator()(unsigned int);
00135 virtual MyRowVector sub(int j_start , int j_end) const;
00136 virtual MyColumnVector transpose() const;
00137 virtual double operator*(const MyColumnVector& a) const;
00138
00139 };
00140
00141 }
00142
00143 #endif
00144
00145 #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