LGS-Loeser 0.1

QMatrix.h

00001 
00002 // Praktikum Informatik 1
00003 // Versuch 7: Lösung eines mathematischen Anwendungsproblems
00004 //
00005 // Datei:  QMatrix.h
00006 // Inhalt: Matrix-Klasse zum speichern von quadratischen Matrizen variabler Größe
00008 
00009 #ifndef QMATRIX_H_
00010 #define QMATRIX_H_
00011 
00015 
00016 #include <iostream>
00017 #include <iomanip>
00018 using namespace std;
00019 
00023 
00024 class QMatrix
00025 {
00026 public:
00027         // Konstruktor, übernimmt die Dimension
00028         QMatrix(int n);
00029         //Kopierkonstruktor
00030         QMatrix(const QMatrix&);
00031         // Zuweisungsoperator
00032         QMatrix& operator=(const QMatrix& B);
00033         //Destruktor
00034         ~QMatrix();
00035         
00036         // Set- und Getmethoden zum Bearbeiten und Lesen der Inhalte des Vektors
00037         double get(const int i, const int j) const;
00038         void set(const int i, const int j, const double zahl);
00039         int getDim() const;
00040         
00041         // Hilfsmethoden für die Cramersche Regel
00042         void transponiere();
00043         QMatrix untermatrix(int i, int j);
00044         
00045 private:
00046         double* A; // Matrix
00047         int dim;
00048 };
00049 
00050 ostream& operator<<(ostream& Stream, const QMatrix& A);
00051 
00052 #endif /*QMATRIX_H_*/
 All Classes