Files
HM2/P2/CMyMatrix.h
2026-01-04 15:35:46 +01:00

32 lines
774 B
C++
Executable File

#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