/* * linearsystemofequations.hpp * * Created on: Jan 8, 2010 * Author: heber */ using namespace std; /*********************************************** includes ***********************************/ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include /****************************************** forward declarations *****************************/ class Vector; class GSLMatrix; class GSLVector; /********************************************** declarations *******************************/ /** Solver class for a linear system of equations in the form \f$A \cdot x = b\F$. * */ class LinearSystemOfEquations { public: LinearSystemOfEquations(int n, int m); ~LinearSystemOfEquations(); // setting void Setb(Vector *x); void Setb(double *x); void SetA(double *x); bool SetSymmetric(bool symmetric); // solving bool GetSolutionAsArray(double *&array); bool GetSolutionAsVector(Vector &v); GSLVector *b; GSLVector *x; GSLMatrix *A; private: bool Solve(); int rows; int columns; bool IsSymmetric; };