#include "types.h"#include "cell.h"#include "linked_list.h"


Go to the source code of this file.
Classes | |
| class | SSparseMatrix |
| The SSparseMatrix structure handle sparse matrices. More... | |
Typedefs | |
| typedef struct SSparseMatrix * | pSSparseMatrix |
Functions | |
| pSSparseMatrix | Lidy_CreateSparseMatrix (unsigned int NbRows, unsigned int NbColumns) |
| Create and allocate a new sparse matrix. | |
| unsigned int | Lidy_GetCurrentNbRows (pSSparseMatrix SparseMatrix) |
| Get the current number of rows in the sparse matrix (often different from the real number of rows). | |
| unsigned int | Lidy_GetCurrentNbColumns (pSSparseMatrix SparseMatrix) |
| Get the current number of columns in the sparse matrix (often different from the real number of columns). | |
| void | Lidy_SetValue (pSSparseMatrix SparseMatrix, Real Value, unsigned int RowIndex, unsigned int ColumnIndex) |
| Set a floating-point value in a cell identified by a row index and a column index. The value is set only if the value is not near from zero. Otherwise, it call 'DeleteCellInSparseMatrix' and delete the cell is possible. | |
| pSCell | Lidy_GetCell (pSSparseMatrix SparseMatrix, unsigned int RowIndex, unsigned int ColumnIndex) |
| Get a whole cell in a sparse matrix identified by a row index and a column index. | |
| Bool | Lidy_DeleteCellInSparseMatrix (pSSparseMatrix SparseMatrix, unsigned int RowIndex, unsigned int ColumnIndex) |
| Delete cell in a sparse matrix identified by a row index and a column index. | |
| void | Lidy_DisplaySparseMatrix (pSSparseMatrix SparseMatrix) |
| Display a sparse matrix. | |
| pSSparseMatrix | Lidy_MultiplySparseMatrices (pSSparseMatrix SparseMatrix1, pSSparseMatrix SparseMatrix2) |
| Multiply two sparse matrices. | |
| pSSparseMatrix | Lidy_MultiplySparseMatrixByScalar (pSSparseMatrix SparseMatrix, Real Value) |
| Multiply a sparse matrix by a scalar. | |
| pSSparseMatrix | Lidy_DivideSparseMatrixByScalar (pSSparseMatrix SparseMatrix, Real Value) |
| Divide a sparse matrix by a scalar. The division is processed only if Value is not near from zero. | |
| pSSparseMatrix | Lidy_AddSparseMatrices (pSSparseMatrix SparseMatrix1, pSSparseMatrix SparseMatrix2) |
| pSSparseMatrix | Lidy_SubstractSparseMatrices (pSSparseMatrix SparseMatrix1, pSSparseMatrix SparseMatrix2) |
| Substract two sparse matrices. | |
| pSSparseMatrix | Lidy_TransposeSparseMatrix (pSSparseMatrix SparseMatrix) |
| Get the transposee of a sparse matrix. | |
| pSSparseMatrix | Lidy_PowerSparseMatrix (pSSparseMatrix SparseMatrix, unsigned int N) |
| pSSparseMatrix | Lidy_LoadSparseMatrixFromXMLFile (const char *Filename) |
| Load a file in XML format into a sparse matrix. | |
| pSSparseMatrix | Lidy_LoadSparseMatrix (const char *Filename) |
| Load a file into a sparse matrix according to the extension of Filename. For instance, if the extension is 'xml', it call 'LoadSparseMatrixInXMLFile'. | |
| Bool | Lidy_SaveSparseMatrixInXMLFile (pSSparseMatrix SparseMatrix, const char *Filename) |
| Save a sparse matrix into a XML file. | |
| Bool | Lidy_SaveSparseMatrix (pSSparseMatrix SparseMatrix, const char *Filename) |
| Save a sparse matrix into a file according the extension of Filename. For instance, if the extension is 'xml', it call 'SaveSparseMatrixInXMLFile'. | |
| void | Lidy_ClearSparseMatrix (pSSparseMatrix SparseMatrix) |
| Clear a sparse matrix if SparseMatrix is not null. | |
| void | Lidy_DeleteSparseMatrix (pSSparseMatrix SparseMatrix) |
| Delete a sparse matrix if SparseMatrix is not null. | |
| typedef struct SSparseMatrix* pSSparseMatrix |
Definition at line 48 of file sparse_matrix.h.
| pSSparseMatrix Lidy_CreateSparseMatrix | ( | unsigned int | NbRows, | |
| unsigned int | NbColumns | |||
| ) |
Create and allocate a new sparse matrix.
| NbRows | is the number of rows greater (It must be greater or equal to one) | |
| NbColumns | is the number of columns different from zero (It must be greater or equal to one) |
| unsigned int Lidy_GetCurrentNbRows | ( | pSSparseMatrix | SparseMatrix | ) |
Get the current number of rows in the sparse matrix (often different from the real number of rows).
| SparseMatrix | is the sparse matrix where the current number of rows is obtained |
| unsigned int Lidy_GetCurrentNbColumns | ( | pSSparseMatrix | SparseMatrix | ) |
Get the current number of columns in the sparse matrix (often different from the real number of columns).
| SparseMatrix | is the sparse matrix where the current number of columns is obtained |
| void Lidy_SetValue | ( | pSSparseMatrix | SparseMatrix, | |
| Real | Value, | |||
| unsigned int | RowIndex, | |||
| unsigned int | ColumnIndex | |||
| ) |
Set a floating-point value in a cell identified by a row index and a column index. The value is set only if the value is not near from zero. Otherwise, it call 'DeleteCellInSparseMatrix' and delete the cell is possible.
| SparseMatrix | is the sparse matrix where the value can be set | |
| Value | is the floating-point value to set | |
| RowIndex | represent the row index into the sparse matrix | |
| ColumnIndex | represent the row index into the sparse matrix |
| pSCell Lidy_GetCell | ( | pSSparseMatrix | SparseMatrix, | |
| unsigned int | RowIndex, | |||
| unsigned int | ColumnIndex | |||
| ) |
Get a whole cell in a sparse matrix identified by a row index and a column index.
| SparseMatrix | is the sparse matrix where the cell can be get | |
| RowIndex | represent the row index into the sparse matrix | |
| ColumnIndex | represent the row index into the sparse matrix |
| Bool Lidy_DeleteCellInSparseMatrix | ( | pSSparseMatrix | SparseMatrix, | |
| unsigned int | RowIndex, | |||
| unsigned int | ColumnIndex | |||
| ) |
Delete cell in a sparse matrix identified by a row index and a column index.
| SparseMatrix | is the sparse matrix where the cell is deleted | |
| RowIndex | represent the row index into the sparse matrix | |
| ColumnIndex | represent the row index into the sparse matrix |
| void Lidy_DisplaySparseMatrix | ( | pSSparseMatrix | SparseMatrix | ) |
Display a sparse matrix.
| SparseMatrix | is the sparse matrix to display |
| pSSparseMatrix Lidy_MultiplySparseMatrices | ( | pSSparseMatrix | SparseMatrix1, | |
| pSSparseMatrix | SparseMatrix2 | |||
| ) |
Multiply two sparse matrices.
| SparseMatrix1 | represent the first sparse matrix | |
| SparseMatrix2 | represent the second sparse matrix |
| pSSparseMatrix Lidy_MultiplySparseMatrixByScalar | ( | pSSparseMatrix | SparseMatrix, | |
| Real | Value | |||
| ) |
Multiply a sparse matrix by a scalar.
| SparseMatrix | represent the sparse matrix | |
| Value | is the scalar value |
| pSSparseMatrix Lidy_DivideSparseMatrixByScalar | ( | pSSparseMatrix | SparseMatrix, | |
| Real | Value | |||
| ) |
Divide a sparse matrix by a scalar. The division is processed only if Value is not near from zero.
| SparseMatrix | represent the sparse matrix | |
| Value | is the scalar value |
| pSSparseMatrix Lidy_AddSparseMatrices | ( | pSSparseMatrix | SparseMatrix1, | |
| pSSparseMatrix | SparseMatrix2 | |||
| ) |
| pSSparseMatrix Lidy_SubstractSparseMatrices | ( | pSSparseMatrix | SparseMatrix1, | |
| pSSparseMatrix | SparseMatrix2 | |||
| ) |
Substract two sparse matrices.
| SparseMatrix1 | represent the first sparse matrix | |
| SparseMatrix2 | represent the second sparse matrix |
| pSSparseMatrix Lidy_TransposeSparseMatrix | ( | pSSparseMatrix | SparseMatrix | ) |
Get the transposee of a sparse matrix.
| SparseMatrix | represent the sparse matrix to transpose |
| pSSparseMatrix Lidy_PowerSparseMatrix | ( | pSSparseMatrix | SparseMatrix, | |
| unsigned int | N | |||
| ) |
| pSSparseMatrix Lidy_LoadSparseMatrixFromXMLFile | ( | const char * | Filename | ) |
Load a file in XML format into a sparse matrix.
| Filename | is the name of the xml file where is stored the sparse matrix description |
| pSSparseMatrix Lidy_LoadSparseMatrix | ( | const char * | Filename | ) |
Load a file into a sparse matrix according to the extension of Filename. For instance, if the extension is 'xml', it call 'LoadSparseMatrixInXMLFile'.
| Filename | is the name of the file where is stored the sparse matrix description |
| Bool Lidy_SaveSparseMatrixInXMLFile | ( | pSSparseMatrix | SparseMatrix, | |
| const char * | Filename | |||
| ) |
Save a sparse matrix into a XML file.
| SparseMatrix | is the sparse matrix to save | |
| Filename | is the name of the xml file where the sparse matrix will be stored |
| Bool Lidy_SaveSparseMatrix | ( | pSSparseMatrix | SparseMatrix, | |
| const char * | Filename | |||
| ) |
Save a sparse matrix into a file according the extension of Filename. For instance, if the extension is 'xml', it call 'SaveSparseMatrixInXMLFile'.
| SparseMatrix | is the sparse matrix to save | |
| Filename | is the name of the file where the sparse matrix will be stored |
| void Lidy_ClearSparseMatrix | ( | pSSparseMatrix | SparseMatrix | ) |
Clear a sparse matrix if SparseMatrix is not null.
| SparseMatrix | is the sparse matrix to clear |
| void Lidy_DeleteSparseMatrix | ( | pSSparseMatrix | SparseMatrix | ) |
Delete a sparse matrix if SparseMatrix is not null.
| SparseMatrix | is the sparse matrix to delete |
1.5.8