19 #ifndef __MATRIX_WRAPPER__ 20 #define __MATRIX_WRAPPER__ 26 #define MyMatrix MatrixWrapper::Matrix 27 #define MyColumnVector MatrixWrapper::ColumnVector 28 #define MyRowVector MatrixWrapper::RowVector 29 #define MySymmetricMatrix MatrixWrapper::SymmetricMatrix 36 class SymmetricMatrix;
50 virtual unsigned int size()
const = 0;
53 virtual unsigned int capacity()
const = 0;
56 virtual unsigned int rows()
const = 0;
59 virtual unsigned int columns()
const = 0;
62 virtual double&
operator()(
unsigned int,
unsigned int) = 0;
65 virtual double operator()(
unsigned int,
unsigned int)
const = 0;
131 virtual void resize(
unsigned int i,
unsigned int j,
132 bool copy=
true,
bool initialize=
true) = 0;
153 virtual MyMatrix sub(
int i_start,
int i_end,
int j_start ,
int j_end)
const = 0;
158 double PYTHAG(
double a,
double b)
const;
160 double SIGN(
double a,
double b)
const;
176 virtual unsigned int size()
const = 0;
179 virtual unsigned int capacity()
const = 0;
183 virtual unsigned int rows()
const = 0;
186 virtual unsigned int columns()
const = 0;
189 virtual double&
operator()(
unsigned int,
unsigned int) = 0;
192 virtual double operator()(
unsigned int,
unsigned int)
const = 0;
266 virtual void resize(
unsigned int i,
bool copy=
true,
bool initialize=
true) = 0;
278 virtual MyMatrix sub(
int i_start,
int i_end,
int j_start ,
int j_end)
const = 0;
281 virtual bool cholesky_semidefinite(
MyMatrix& m)
const ;
296 #endif // __MATRIX_WRAPPER__ double SIGN(double a, double b) const
virtual MyMatrix & operator-=(double a)=0
MATRIX - SCALAR operator.
virtual MyMatrix operator+(double b) const =0
MATRIX - SCALAR operator.
double PYTHAG(double a, double b) const
#define MySymmetricMatrix
Matrix_Wrapper()
Constructor.
virtual MyMatrix operator/(double b) const =0
MATRIX - SCALAR operator.
virtual MyMatrix sub(int i_start, int i_end, int j_start, int j_end) const =0
get sub matrix
virtual bool operator==(const MyMatrix &a) const =0
Operator ==.
virtual MyMatrix inverse() const =0
get inverse
Class SymmetricMatrixWrapper.
virtual unsigned int capacity() const =0
Ask Number of Rows.
virtual unsigned int rows() const =0
Ask Number of Rows.
virtual unsigned int size() const =0
Ask Number of Rows.
SymmetricMatrix_Wrapper()
Constructor.
virtual MyColumnVector columnCopy(unsigned int c) const =0
Get column from matrix.
virtual MyMatrix & operator*=(double b)=0
MATRIX - SCALAR operator.
virtual MyMatrix operator-(double b) const =0
MATRIX - SCALAR operator.
virtual MyMatrix & operator/=(double b)=0
MATRIX - SCALAR operator.
virtual ~SymmetricMatrix_Wrapper()
Destructor.
virtual MyMatrix operator*(double b) const =0
MATRIX - SCALAR operator.
virtual MyMatrix transpose() const =0
get transpose
virtual double determinant() const =0
get determinant
virtual bool SVD(MyColumnVector &D, MyMatrix &U, MyMatrix &V) const
SVD Decomposition (for pseudo-inverse properties)
virtual int convertToSymmetricMatrix(MySymmetricMatrix &sym)=0
Turn matrix into Symmetric one.
virtual MyRowVector rowCopy(unsigned int r) const =0
Get row from matrix.
virtual ~Matrix_Wrapper()
Destructor.
virtual MyMatrix pseudoinverse(double epsilon=0.01) const
get pseudoinverse
virtual double & operator()(unsigned int, unsigned int)=0
Operator ()
virtual MyMatrix & operator+=(double a)=0
MATRIX - SCALAR operator.
virtual MyMatrix & operator=(double a)=0
Set all elements of the Matrix equal to a.
virtual void resize(unsigned int i, unsigned int j, bool copy=true, bool initialize=true)=0
resize matrix
virtual unsigned int columns() const =0
Ask Number of Columns.