| 1 | #cxx . . $ `<file>/dwtools/Matrix_extensions.h`/ifndef _Matrix_extensions_h_ |
| 2 | #define _Matrix_extensions_h_cxx . . $ `dwtools/Matrix_extensions.h:2:9`! |
| 3 | /* Matrix_extensions.h |
| 4 | * |
| 5 | * Copyright (C) 1993-2020 David Weenink |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | djmw 20020813 GPL header |
| 23 | djmw 20121110 Latest modification |
| 24 | */ |
| 25 | |
| 26 | #include "Matrix.h"cxx . . $ `<file>/fon/Matrix.h`/ |
| 27 | #include "Eigen.h"cxx . . $ `<file>/dwsys/Eigen.h`/ |
| 28 | #include "Graphics.h"cxx . . $ `<file>/sys/Graphics.h`/ |
| 29 | #include "Graphics_extensions.h"cxx . . $ `<file>/dwsys/Graphics_extensions.h`/ |
| 30 | #include "SVD.h"cxx . . $ `<file>/dwsys/SVD.h`/ |
| 31 | |
| 32 | autoMatrixcxx . . $ autoMatrix# Matrix_readFromIDXFormatFilecxx . . $ Matrix_readFromIDXFormatFile(b105b5e8b59bae72). (MelderFilecxx . . $ MelderFile# file); |
| 33 | autoDaatacxx . . $ autoDaata# IDXFormattedMatrixFileRecognizercxx . . $ IDXFormattedMatrixFileRecognizer(c32780b24c371669). (integercxx . . $ integer# numberOfBytesRead, const char *header, MelderFilecxx . . $ MelderFile# file); |
| 34 | |
| 35 | void Matrix_scatterPlotcxx . . $ Matrix_scatterPlot(6e3d98d77fd8d1ac). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# g, integercxx . . $ integer# icx, integercxx . . $ integer# icy, |
| 36 | double xmin, double xmax, double ymin, double ymax, |
| 37 | double size_mm, conststring32cxx . . $ conststring32# mark, bool garnish); |
| 38 | /* Draw my columns ix and iy as a scatterplot (with squares) */ |
| 39 | |
| 40 | void Matrix_drawAsSquares_insidecxx . . $ Matrix_drawAsSquares_inside(2274d44bd3dcbda3). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# g, double xmin, double xmax, double ymin, double ymax, kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin# origin, double cellAreaScaleFactor, kGraphicsMatrixCellDrawingOrdercxx . . $ kGraphicsMatrixCellDrawingOrder# drawingOrder); |
| 41 | |
| 42 | void Matrix_drawAsSquarescxx . . $ Matrix_drawAsSquares(1fe49c89cf0fdfd8). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# graphics, double xmin, double xmax, double ymin, double ymax, bool garnished); |
| 43 | /* Draw a Matrix as small squares whose area correspond to the matrix element */ |
| 44 | /* The square is filled with black if the weights are negative */ |
| 45 | |
| 46 | void Matrix_drawRowsAsLineSegmentscxx . . $ Matrix_drawRowsAsLineSegments(4ef85338ddf7aa8d). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# g, double xmin, double xmax, double ymin, double ymax, |
| 47 | double minimum, double maximum, int connect); |
| 48 | /* draw a row as segments */ |
| 49 | |
| 50 | void Matrix_scalecxx . . $ Matrix_scale(ee0f0a6f10977516). (Matrixcxx . . $ Matrix# me, int choice); |
| 51 | /* choice = 1 :divide each elmnt by the maximum (abs) */ |
| 52 | /* choice = 2 :rows, divide each row elmnt by the maximum (abs) of that row */ |
| 53 | /* choice = 3 :columns, divide each col elmnt by the maximum of that col */ |
| 54 | |
| 55 | autoMatrixcxx . . $ autoMatrix# Matrix_transposecxx . . $ Matrix_transpose(2040fcb56df6d494). (Matrixcxx . . $ Matrix# me); |
| 56 | |
| 57 | void Matrix_drawDistributioncxx . . $ Matrix_drawDistribution(6050e36a0fbe8a58). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# g, double xmin, double xmax, |
| 58 | double ymin, double ymax, double minimum, double maximum, integercxx . . $ integer# nBins, |
| 59 | double freqMin, double freqmax, bool cumulative, bool garnish); |
| 60 | |
| 61 | void Matrix_drawSliceYcxx . . $ Matrix_drawSliceY(6082701fbf377cb1). (Matrixcxx . . $ Matrix# me, Graphicscxx . . $ Graphics# g, double x, double ymin, double ymax, |
| 62 | double min, double max); |
| 63 | |
| 64 | int Matrix_fitPolynomialcxx . . $ Matrix_fitPolynomial(7ee4b97e3bad3cf1). (Matrixcxx . . $ Matrix# me, integercxx . . $ integer# maxDegree); |
| 65 | |
| 66 | autoMatrixcxx . . $ autoMatrix# Matrix_solveEquationcxx . . $ Matrix_solveEquation(e20d5e7d0bc10058). (Matrixcxx . . $ Matrix# me, double tolerance); |
| 67 | |
| 68 | autoMatrixcxx . . $ autoMatrix# Matrix_solveEquationcxx . . $ Matrix_solveEquation(e6c4a1503220b210). (Matrixcxx . . $ Matrix# me, Matrixcxx . . $ Matrix# thee, double tolerance); // Me * X = Thee |
| 69 | |
| 70 | double Matrix_getMeancxx . . $ Matrix_getMean(ebf5718d71cfe4d5). (Matrixcxx . . $ Matrix# me, double xmin, double xmax, double ymin, double ymax); |
| 71 | |
| 72 | double Matrix_getStandardDeviationcxx . . $ Matrix_getStandardDeviation(ebf5718d71cfe4d5). (Matrixcxx . . $ Matrix# me, double xmin, double xmax, double ymin, double ymax); |
| 73 | |
| 74 | autoEigencxx . . $ autoEigen# Matrix_to_Eigencxx . . $ Matrix_to_Eigen(52ba5cc7f6512331). (Matrixcxx . . $ Matrix# me); // deprecated feb 2026 |
| 75 | /* Symmetric matrix */ |
| 76 | |
| 77 | autoEigencxx . . $ autoEigen# Matrix_to_Eigen_specialcxx . . $ Matrix_to_Eigen_special(8264bf8c91419b80). (Matrixcxx . . $ Matrix# me, kMAT_TYPEcxx . . $ kMAT_TYPE# matType, integercxx . . $ integer# numberOfEigenvalues, bool sortAscending); |
| 78 | /* Symmetric and symmetric tridiagonal matrices have real eigenvalues and eigenvectors. */ |
| 79 | |
| 80 | autoMatrixcxx . . $ autoMatrix# SVD_to_Matrixcxx . . $ SVD_to_Matrix(1cbbc9ae73c11e54). (SVDcxx . . $ SVD# me, integercxx . . $ integer# from, integercxx . . $ integer# to); |
| 81 | |
| 82 | void Matrix_Eigen_complexcxx . . $ Matrix_Eigen_complex(bf3f56fc6cdc8bfa). (Matrixcxx . . $ Matrix# me, autoMatrixcxx . . $ autoMatrix# *out_eigenvectors, autoMatrixcxx . . $ autoMatrix# *out_eigenvalues); |
| 83 | /* General square matrix */ |
| 84 | |
| 85 | #endif /* _Matrix_extensions_h_ */ |