Files
neuronalesNetz/Startcode/matrix.c
T

49 lines
932 B
C

#include <stdlib.h>
#include <string.h>
#include "matrix.h"
// TODO Matrix-Funktionen implementieren
Matrix createMatrix(unsigned int rows, unsigned int cols)
{
Matrix matrix;
matrix.rows = rows;
matrix.cols = cols;
matrix.values = malloc(rows * cols * sizeof(MatrixType));
return matrix;
}
//gibt den vorher belegten Speicher wieder frei
void clearMatrix(Matrix *matrix)
{
if(matrix == NULL){
return;
}
for(int i = 0; i < values; i++){
free()
}
}
//schreibt einen Wert an eine bestimmte Stelle in der Matrix
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
{
}
//Liest einen Wert aus der Matrix
MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
{
}
Matrix add(const Matrix matrix1, const Matrix matrix2)
{
}
Matrix multiply(const Matrix matrix1, const Matrix matrix2)
{
}