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 __VECTOR_LTI__
00024 #define __VECTOR_LTI__
00025
00026 #include "matrix_wrapper.h"
00027 #include "vector_wrapper.h"
00028 #include <iostream>
00029 #include <ltilib/ltiIoHandler.h>
00030 #include <ltilib/ltiVector.h>
00031
00032
00033
00034
00035 #define ltiColumnVector lti::vector<double>
00036 #define ltiRowVector lti::vector<double>
00037
00039 class MyColumnVector : public ltiColumnVector, public ColumnVector_Wrapper
00040 {
00041 public:
00042
00043
00044 ColumnVector();
00045 ColumnVector(int nrows);
00046 ColumnVector(const MyColumnVector& a, const MyColumnVector& b);
00047 ColumnVector(const ltiColumnVector &a);
00048
00049 ColumnVector(const MyMatrix &a);
00050
00051 virtual ~ColumnVector();
00052
00053
00054 ColumnVector (const MyColumnVector& a);
00055
00056 virtual void resize(int num_rows);
00057 virtual unsigned int rows() const;
00058 virtual unsigned int columns() const;
00059 virtual unsigned int capacity() const;
00060 virtual void assign(int size, double value) ;
00061 virtual ColumnVector vectorAdd(const MyColumnVector& v2) const;
00062 virtual ColumnVector& operator =(const MyColumnVector& a);
00063 virtual ColumnVector& operator =(double a);
00064 virtual const bool operator==(const MyColumnVector& a) const;
00065
00066 virtual MyColumnVector & operator+= (const MyColumnVector& a);
00067 virtual MyColumnVector & operator-= (const MyColumnVector& a);
00068 virtual MyColumnVector operator+ (const MyColumnVector &a) const;
00069 virtual MyColumnVector operator- (const MyColumnVector &a) const;
00070
00071 virtual MyColumnVector& operator+= (double b);
00072 virtual MyColumnVector& operator-= (double b);
00073 virtual MyColumnVector& operator*= (double b);
00074 virtual MyColumnVector& operator/= (double b);
00075 virtual MyColumnVector operator+ (double b) const;
00076 virtual MyColumnVector operator- (double b) const;
00077 virtual MyColumnVector operator* (double b) const;
00078 virtual MyColumnVector operator/ (double b) const;
00079
00080 virtual const double operator()(unsigned int) const;
00081 virtual double& operator()(unsigned int);
00082 virtual MyMatrix operator* (const MyRowVector &a) const;
00083 virtual MyColumnVector sub(int j_start , int j_end) const;
00084 virtual MyRowVector transpose() const;
00085
00086 };
00087
00088
00090 class MyRowVector : public ltiRowVector, public RowVector_Wrapper
00091 {
00092
00093
00094
00095 public:
00096 RowVector();
00097 RowVector(int ncols);
00098
00099
00100 RowVector(const ltiRowVector &a);
00101
00102 RowVector (const MyRowVector& a);
00103
00104 virtual ~RowVector();
00105
00106 virtual void resize(int num_cols);
00107 virtual void assign(int size, double value) ;
00108 virtual RowVector vectorAdd(const MyRowVector& v2) const;
00109 virtual unsigned int rows() const;
00110 virtual unsigned int columns() const;
00111 virtual unsigned int capacity() const;
00112 virtual RowVector& operator =(double a);
00113 virtual RowVector& operator =(const MyRowVector& a);
00114 virtual const bool operator==(const MyRowVector& a) const;
00115
00116 virtual MyRowVector & operator+= (const MyRowVector& a);
00117 virtual MyRowVector & operator-= (const MyRowVector& a);
00118 virtual MyRowVector operator+ (const MyRowVector &a) const;
00119 virtual MyRowVector operator- (const MyRowVector &a) const;
00120
00121 virtual MyRowVector& operator+= (double b);
00122 virtual MyRowVector& operator-= (double b);
00123 virtual MyRowVector& operator*= (double b);
00124 virtual MyRowVector& operator/= (double b);
00125 virtual MyRowVector operator+ (double b) const;
00126 virtual MyRowVector operator- (double b) const;
00127 virtual MyRowVector operator* (double b) const;
00128 virtual MyRowVector operator/ (double b) const;
00129
00130 virtual const double operator()(unsigned int) const;
00131 virtual double& operator()(unsigned int);
00132 virtual MyRowVector sub(int j_start , int j_end) const;
00133 virtual MyColumnVector transpose() const;
00134 virtual MyRowVector operator* (const MyMatrix& a);
00135 virtual double operator*(const MyColumnVector& a) const;
00136
00137 };
00138
00139
00140 #endif
00141
00142 #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 Mon Feb 11 2019 03:45:12