forked from freudenreichan/info2Praktikum-NeuronalesNetz
2nd fail fixed
This commit is contained in:
parent
5b5e1182bd
commit
ebff958c4e
7
matrix.c
7
matrix.c
@ -44,7 +44,12 @@ MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int co
|
|||||||
{
|
{
|
||||||
MatrixType value = 0;
|
MatrixType value = 0;
|
||||||
|
|
||||||
return value = matrix.buffer[rowIdx * matrix.cols + colIdx]; // hole Wert value am Punkt (row col)
|
if (rowIdx < matrix.rows && colIdx < matrix.cols)
|
||||||
|
{
|
||||||
|
value = matrix.buffer[rowIdx * matrix.cols + colIdx]; // hole Wert value am Punkt (row col)
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Matrix add(const Matrix matrix1, const Matrix matrix2)
|
Matrix add(const Matrix matrix1, const Matrix matrix2)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user