10 #define ODP_MATRIX_HPP
13 #error This is a C++ include file and cannot be used from plain C
20 #include "cpl_matrix.h"
66 explicit Matrix(cpl_size rows, cpl_size cols);
139 void Get(cpl_size row,
141 double *value)
const;
153 double Get(cpl_size row,
167 void Set(cpl_size row,
322 bool IsZero(
const double tolerance);
520 #include "matrix.ipp"
bool operator==(const Matrix &) const
Overload operator==.
Definition: matrix.cpp:462
friend std::ostream & operator<<(std::ostream &os, const Matrix &matrix)
Overload operator<<.
Definition: matrix.cpp:524
bool IsIdentity(const double tolerance)
Check for identity matrix.
Definition: matrix.cpp:247
Matrix & operator/=(const double)
Overload operator/=.
Definition: matrix.cpp:406
void Get(cpl_size row, cpl_size col, double *value) const
Get value of an element in the matrix.
Definition: matrix.cpp:74
Matrix & operator+=(const double)
Overload operator+=.
Definition: matrix.cpp:364
Matrix & Sqrt(const Matrix &matrix)
It computes the sqrt of each element in the matrix.
Definition: matrix.cpp:509
cpl_size GetNumCols() const
Get number of matrix columns.
cpl_matrix * m_cpl_matrix
Definition: matrix.hpp:515
cpl_size GetNumRows() const
Get number of rows.
void SetCplMatrix(cpl_matrix *matrix)
Set CPL image.
Matrix & operator*(const double)
Overload operator*.
Definition: matrix.cpp:343
void SolveNormal(const Matrix &, Matrix *solved)
Solution of overdetermined linear equations in a least squares sense.
Definition: matrix.cpp:185
std::string GetSize() const
Get the size of the matrix in the format [row]x[col].
Definition: matrix.cpp:114
This class is C++ wrapper for a CPL matrix object. It provides a simplified interface that allows to ...
Definition: matrix.hpp:38
Matrix & operator/(const double)
Overload operator/.
Definition: matrix.cpp:323
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:34
Matrix()
Class constructor.
Definition: matrix.cpp:23
void Invert(Matrix *inverse)
Find a matrix inverse.
Definition: matrix.cpp:203
void * GetMatrixPtr() const
Get pointer to matrix data.
void Append(const Matrix &matrix, int mode)
Append a matrix to another.
Definition: matrix.cpp:220
virtual ~Matrix()
Class destructor.
Definition: matrix.cpp:60
Matrix & operator-(const double)
Overload operator-.
Definition: matrix.cpp:303
void Transpose(Matrix *transpose)
Create transposed matrix.
Definition: matrix.cpp:149
Matrix & operator=(const Matrix &)
Overload operator=.
Definition: matrix.cpp:449
void Product(const Matrix &, Matrix *product)
Rows-by-columns product of two matrices.
Definition: matrix.cpp:124
bool IsMatrix() const
Check is CPL matrix is not null.
Matrix & operator-=(const double)
Overload operator-=.
Definition: matrix.cpp:385
bool operator!=(const Matrix &) const
Overload operator !=.
Definition: matrix.cpp:485
bool IsDiagonal(const double tolerance)
Check if the matrix is diagonal.
Definition: matrix.cpp:233
Matrix & operator*=(const double)
Overload operator*=.
Definition: matrix.cpp:427
bool IsZero(const double tolerance)
Check for zero matrix.
Definition: matrix.cpp:260
Matrix & operator+(const double)
Overload operator+.
Definition: matrix.cpp:280
cpl_matrix * GetCplMatrix() const
Get CPL matrix pointer.
void Solve(const Matrix &, Matrix *solved)
Solution of linear system .
Definition: matrix.cpp:167
void Set(cpl_size row, cpl_size col, double value)
Set an element value in the matrix.
Definition: matrix.cpp:103