Woolz Image Processing
Version 1.8.3
|
Matrix allocation and maintenance functions. More...
Functions | |
AlgMatrix | AlgMatrixNew (AlgMatrixType aType, size_t nR, size_t nC, size_t nE, double tol, AlgError *dstErr) |
Allocates a new matrix or the requested type. More... | |
AlgMatrixRect * | AlgMatrixRectNew (size_t nR, size_t nC, AlgError *dstErr) |
Allocates a new rectangular matrix. More... | |
void | AlgMatrixFree (AlgMatrix mat) |
Frees a matrix. More... | |
void | AlgMatrixRectFree (AlgMatrixRect *mat) |
Frees a rectangular matrix. More... | |
AlgMatrixSym * | AlgMatrixSymNew (size_t nN, AlgError *dstErr) |
Allocates a new symmetric matrix. More... | |
void | AlgMatrixSymFree (AlgMatrixSym *mat) |
Frees a symmetric matrix. More... | |
AlgMatrixLLR * | AlgMatrixLLRNew (size_t nR, size_t nC, size_t nE, double tol, AlgError *dstErr) |
Allocates a new linked list row matrix. More... | |
void | AlgMatrixLLRFree (AlgMatrixLLR *mat) |
Frees a linked list row matrix. More... | |
AlgMatrixLLRE * | AlgMatrixLLRENew (AlgMatrixLLR *mat) |
Gets a linked list row matrix entry from the matrix. The return value may be NULL if none are available and the entries need to be expanded sing AlgMatrixLLRExpand(). More... | |
void | AlgMatrixLLREFree (AlgMatrixLLR *mat, AlgMatrixLLRE *p) |
Returns a linked list row matrix entry to the free stack of the matrix. More... | |
AlgError | AlgMatrixWriteAscii (AlgMatrix mat, FILE *fP) |
Writes a matrix in numeric ASCI format to the given file file. The rows are on separate lines and the columns of each row are white space seperated. More... | |
AlgMatrix | AlgMatrixReadAscii (AlgMatrixType mType, double tol, FILE *fP, const char *fSep, size_t recMax, AlgError *dstErr) |
Reads a matrix of the requested type from an ASCII file. If the type is ALG_MATRIX_SYM then only the first half of each row will be used, although all must be given. More... | |
AlgError | AlgMatrixSet (AlgMatrix mat, size_t row, size_t col, double val) |
AlgError | AlgMatrixLLRCopyInPlace (AlgMatrixLLR *aM, AlgMatrixLLR *bM) |
Copy the second LLR matrix to the first. More... | |
AlgError | AlgMatrixLLRSet (AlgMatrixLLR *mat, size_t row, size_t col, double val) |
This can have one of three actions: More... | |
double | AlgMatrixValue (AlgMatrix mat, size_t row, size_t col) |
Returns the value in the matrix at the given coordinates. More... | |
double | AlgMatrixLLRValue (AlgMatrixLLR *mat, size_t row, size_t col) |
Returns the value in the matrix at the given coordinates. More... | |
AlgError | AlgMatrixLLRExpand (AlgMatrixLLR *mat, size_t nE) |
Ensures that there are at least the requested number of free linked list row matrix entries available. More... | |
void | AlgMatrixZero (AlgMatrix mat) |
Sets all elements of the matrix to zero. More... | |
void | AlgMatrixRectZero (AlgMatrixRect *mat) |
Sets all elements of the matrix to zero. More... | |
void | AlgMatrixSymZero (AlgMatrixSym *mat) |
Sets all elements of the matrix to zero. More... | |
void | AlgMatrixLLRZero (AlgMatrixLLR *mat) |
Sets all elements of the matrix to zero. More... | |
AlgError | AlgMatrixSetAll (AlgMatrix mat, double val) |
Sets all elements of the given matrix to the given value. More... | |
void | AlgMatrixRectSetAll (AlgMatrixRect *mat, double val) |
Sets all elements of the given rectangular matrix to the given value. More... | |
void | AlgMatrixSymSetAll (AlgMatrixSym *mat, double val) |
Sets all elements of the given symmetric matrix to the given value. More... | |
AlgError | AlgMatrixLLRSetAll (AlgMatrixLLR *mat, double val) |
Sets all elements of the given linked list row matrix to the given value. This is not an efficient use of a linked list row matrix since all values will be allocate and set. More... | |
void | AlgMatrixLLRERemove (AlgMatrixLLR *mat, size_t row, size_t col) |
Removes the entry at the given coordinates. More... | |
Matrix allocation and maintenance functions.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
void AlgMatrixFree | ( | AlgMatrix | mat | ) |
Frees a matrix.
mat | Given matrix. |
References ALG_MATRIX_LLR, ALG_MATRIX_RECT, ALG_MATRIX_SYM, AlgMatrixLLRFree(), AlgMatrixRectFree(), AlgMatrixSymFree(), _AlgMatrix::core, _AlgMatrix::llr, _AlgMatrix::rect, _AlgMatrix::sym, and _AlgMatrixCore::type.
Referenced by AlgMatrixReadAscii(), WlzAffineTransformLSqDQ2D(), WlzAffineTransformLSqDQ3D(), WlzAffineTransformLSqReg2D(), WlzAffineTransformLSqReg3D(), WlzCMeshMeshMeshProduct(), WlzGeomCurvature(), WlzGeometryLSqOPlane(), WlzKrigReallocBuffers2D(), and WlzKrigReallocBuffers3D().
void AlgMatrixRectFree | ( | AlgMatrixRect * | mat | ) |
Frees a rectangular matrix.
mat | Rectangular matrix. |
References AlcDouble2Free(), AlcFree(), and _AlgMatrixRect::array.
Referenced by AlgMatrixFree(), AlgMatrixSVSolve(), AlgPolynomialLSq(), and WlzFitPlaneSVD().
void AlgMatrixSymFree | ( | AlgMatrixSym * | mat | ) |
Frees a symmetric matrix.
mat | symmetric matrix. |
References AlcDouble2Free(), AlcFree(), and _AlgMatrixSym::array.
Referenced by AlgMatrixFree().
void AlgMatrixLLRFree | ( | AlgMatrixLLR * | mat | ) |
Frees a linked list row matrix.
mat | Linked list row matrix. |
References AlcFree(), AlcFreeStackFree(), _AlgMatrixLLR::blk, and _AlgMatrixLLR::tbl.
Referenced by AlgMatrixFree(), and AlgMatrixLLRNew().