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);
This class handle the errors produced by the calling of image processing routines.
Definition error.hpp:35
This class is C++ wrapper for a CPL matrix object. It provides a simplified interface that allows to ...
Definition matrix.hpp:39
Matrix & operator-(const double)
Overload operator-.
Definition matrix.cpp:277
bool IsDiagonal(const double tolerance)
Check if the matrix is diagonal.
Definition matrix.cpp:212
friend std::ostream & operator<<(std::ostream &os, const Matrix &matrix)
Overload operator<<.
Definition matrix.cpp:483
Matrix & operator*(const double)
Overload operator*.
Definition matrix.cpp:313
Matrix & operator-=(const double)
Overload operator-=.
Definition matrix.cpp:351
void Invert(Matrix *inverse)
Find a matrix inverse.
Definition matrix.cpp:186
void Solve(const Matrix &, Matrix *solved)
Solution of linear system .
Definition matrix.cpp:154
void Transpose(Matrix *transpose)
Create transposed matrix.
Definition matrix.cpp:138
Matrix & operator*=(const double)
Overload operator*=.
Definition matrix.cpp:389
std::string GetSize() const
Get the size of the matrix in the format [row]x[col].
Definition matrix.cpp:106
Matrix & Sqrt(const Matrix &matrix)
It computes the sqrt of each element in the matrix.
Definition matrix.cpp:468
void Product(const Matrix &, Matrix *product)
Rows-by-columns product of two matrices.
Definition matrix.cpp:116
Matrix & operator=(const Matrix &)
Overload operator=.
Definition matrix.cpp:409
virtual ~Matrix()
Class destructor.
Definition matrix.cpp:56
cpl_size GetNumRows() const
Get number of rows.
cpl_matrix * GetCplMatrix() const
Get CPL matrix pointer.
Matrix & operator+=(const double)
Overload operator+=.
Definition matrix.cpp:332
bool IsMatrix() const
Check is CPL matrix is not null.
bool IsIdentity(const double tolerance)
Check for identity matrix.
Definition matrix.cpp:225
Matrix & operator/=(const double)
Overload operator/=.
Definition matrix.cpp:370
void Append(const Matrix &matrix, int mode)
Append a matrix to another.
Definition matrix.cpp:201
void SetCplMatrix(cpl_matrix *matrix)
Set CPL image.
void SolveNormal(const Matrix &, Matrix *solved)
Solution of overdetermined linear equations in a least squares sense.
Definition matrix.cpp:170
void Set(cpl_size row, cpl_size col, double value)
Set an element value in the matrix.
Definition matrix.cpp:96
Matrix()
Class constructor.
Definition matrix.cpp:22
Matrix & operator/(const double)
Overload operator/.
Definition matrix.cpp:295
cpl_size GetNumCols() const
Get number of matrix columns.
bool operator==(const Matrix &) const
Overload operator==.
Definition matrix.cpp:421
cpl_matrix * m_cpl_matrix
Definition matrix.hpp:515
bool operator!=(const Matrix &) const
Overload operator !=.
Definition matrix.cpp:444
Matrix & operator+(const double)
Overload operator+.
Definition matrix.cpp:256
void * GetMatrixPtr() const
Get pointer to matrix data.
void Get(cpl_size row, cpl_size col, double *value) const
Get value of an element in the matrix.
Definition matrix.cpp:69
bool IsZero(const double tolerance)
Check for zero matrix.
Definition matrix.cpp:237