matrix module
1.00.00
www.protokollkonverter.de
|
prototypes of functions to calculate matrices and vectors More...
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | VECTOR_STANDARD_DIMENSION 3 |
standard dimension for vectors, normal coordination system More... | |
Typedefs | |
typedef struct _MATRIX * | MATRIX |
instance pointer of a matrix More... | |
typedef struct _MATRIX * | VECTOR |
instance pointer of a vector More... | |
typedef double | MATRIX_VALUE |
type of supported value More... | |
Functions | |
void | matrixPrint (MATRIX A) |
print matrix More... | |
MATRIX | matrixNew (const size_t rows, const size_t columns) |
create a new matrix More... | |
MATRIX | matrixNewUnit (const size_t dimension) |
create a new unit matrix More... | |
void | matrixDelete (MATRIX *A) |
free memory allocated by matrixNew More... | |
bool | matrixGetDimension (MATRIX A, size_t *rows, size_t *columns) |
get dimensions of matrix More... | |
bool | matrixEquals (MATRIX A, MATRIX B) |
compare two matrices More... | |
bool | matrixSetElement (MATRIX A, const size_t row, const size_t column, const MATRIX_VALUE value) |
set one element in matrix More... | |
bool | matrixSetRow (MATRIX A, const size_t row, const MATRIX_VALUE values[], const size_t valuesCount) |
set one row in matrix More... | |
bool | matrixSetColumn (MATRIX A, const size_t column, const MATRIX_VALUE values[], const size_t valuesCount) |
set one column in matrix More... | |
bool | matrixSet (MATRIX A, const MATRIX_VALUE values[], const size_t valuesCount) |
set values of matrix More... | |
bool | matrixGetElement (MATRIX A, const size_t row, const size_t column, MATRIX_VALUE *value) |
get one element in matrix More... | |
bool | matrixGetRow (MATRIX A, const size_t row, MATRIX_VALUE values[], size_t *valuesCount) |
get one row in matrix More... | |
bool | matrixGetColumn (MATRIX A, const size_t column, MATRIX_VALUE values[], size_t *valuesCount) |
get one column in matrix More... | |
bool | matrixGet (MATRIX A, MATRIX_VALUE values[], size_t *valuesCount) |
get values of matrix More... | |
MATRIX | matrixAddition (MATRIX A, MATRIX B) |
addition of two matrices More... | |
MATRIX | matrixSubstraction (MATRIX A, MATRIX B) |
subtraction of two matrices More... | |
MATRIX | matrixMultiplication (MATRIX A, MATRIX B) |
multiplication of two matrices More... | |
MATRIX | matrixMultiplicationScalar (MATRIX A, MATRIX_VALUE scalar) |
multiplication of matrix with scalar More... | |
MATRIX | matrixTransposition (MATRIX A) |
transposition of matrix More... | |
MATRIX | matrixInverse (MATRIX A) |
calculate inverse of matrix More... | |
bool | matrixDeterminant (MATRIX A, MATRIX_VALUE *determinant) |
calculate determinant of matrix More... | |
MATRIX | matrixClone (MATRIX A) |
clone a matrix More... | |
VECTOR | matrixSolve (MATRIX A, VECTOR y) |
solve matrix A with result vector y More... | |
VECTOR | vectorNew (const size_t dimension) |
create a new column vector More... | |
void | vectorDelete (VECTOR *v) |
free memory allocated by vectorNew More... | |
bool | vectorGetDimension (VECTOR v, size_t *dimension) |
get dimension of vector More... | |
bool | vectorEquals (VECTOR v, VECTOR w) |
compare two vectors More... | |
bool | vectorSetElement (VECTOR v, const size_t row, MATRIX_VALUE value) |
set one element in vector More... | |
bool | vectorGetElement (VECTOR v, const size_t row, MATRIX_VALUE *value) |
get one element in vector More... | |
bool | vectorSet (VECTOR v, const MATRIX_VALUE values[], const size_t valuesCount) |
set all values of vector More... | |
bool | vectorGet (VECTOR v, MATRIX_VALUE values[], size_t *valuesCount) |
get all values of vector More... | |
VECTOR | vectorAddition (VECTOR v, VECTOR w) |
add two vectors More... | |
VECTOR | vectorSubstraction (VECTOR v, VECTOR w) |
subtract a vector More... | |
VECTOR | vectorMultiplicationScalar (VECTOR v, MATRIX_VALUE scalar) |
multiply a vector with scalar More... | |
bool | vectorDotProduct (VECTOR v, VECTOR w, MATRIX_VALUE *product) |
dot product of two vectors More... | |
VECTOR | vectorCrossProduct (VECTOR v, VECTOR w) |
cross product of two vectors More... | |
bool | vectorScalarTripleProduct (VECTOR v, VECTOR w, VECTOR x, MATRIX_VALUE *product) |
scalar triple product of three vectors More... | |
MATRIX | vectorOuterProduct (VECTOR v, VECTOR w) |
outer product of two vectors More... | |
bool | vectorLength (VECTOR v, MATRIX_VALUE *length) |
calculate length of vector More... | |
VECTOR | vectorClone (VECTOR v) |
clone a vector More... | |
prototypes of functions to calculate matrices and vectors
Home of this file is http://www.protokollkonverter.de.
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 3 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, see https://www.gnu.org/licenses/.
date | version | author | comment |
---|---|---|---|
04/28/2018 | 1.00.00 | Thomas Stalter | first release |
03/29/2018 | 0.99.00 | Thomas Stalter | initial version |