00001
00042
00043
00044
00045 #ifndef _LinearEquationSolver_H_
00046 #define _LinearEquationSolver_H_
00047
00048
00049 #include <ReClaM/Model.h>
00050 #include <ReClaM/ErrorFunction.h>
00051
00052
00073 class LinearEquation : public Model, public ErrorFunction
00074 {
00075 public:
00077 LinearEquation(const Array<double>& mat, const Array<double>& vec);
00078
00080 ~LinearEquation();
00081
00084 void model(const Array<double>& input, Array<double>& output);
00085
00087 double error(Model& model, const Array<double>& input, const Array<double>& target);
00088
00090 double errorDerivative(Model& model, const Array<double>& input, const Array<double>& target, Array<double>& derivative);
00091
00093 void getSolution(Array<double>& solution);
00094
00095 protected:
00096 double error();
00097 double errorDerivative(Array<double>& derivative);
00098
00099 const Array<double>& matrix;
00100 const Array<double>& vector;
00101 };
00102
00103
00104 #endif
00105