This commit is contained in:
2026-01-04 15:35:46 +01:00
commit f53b8768f8
70 changed files with 51910 additions and 0 deletions

31
P2/CMyMatrix.h Executable file
View File

@@ -0,0 +1,31 @@
#include <vector>
#include <iostream>
#include "CMyVektor.h"
class CMyMatrix {
private:
std::vector<std::vector<double>> matrix;
int zeilen = 0;
int spalten = 0;
public:
CMyMatrix(int zeilen, int spalten);
double getZeilen();
double getSpalten();
void setWert(double wert, int zeile, int spalte);
double getWert(int zeile, int spalte);
double& operator()(int zeile, int spalte);
CMyMatrix invers();
friend CMyVektor operator*(CMyMatrix A, CMyVektor x);
friend std::ostream& operator<<(std::ostream& os, CMyMatrix x);
};
CMyMatrix jacobi(CMyVektor x, CMyVektor(*funktion)(CMyVektor)); //como friend-> error de compiler "C3767"
void newtonverfahren(CMyVektor x, CMyVektor(*funktion)(CMyVektor)); //libro pagina 221