libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRNEquationSolver.h
Go to the documentation of this file.
1 /* Copyright 2008-2014 INSA Lyon
2  *
3  * This file is part of libcrn.
4  *
5  * libcrn is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcrn is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libcrn. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: CRNEquationSolver.h
19  *
20  * \author Jean DUONG
21  */
22 
23 
24 #ifndef CRNEQUATIONSOLVER_HEADER
25 #define CRNEQUATIONSOLVER_HEADER
26 
27 #include <CRN.h>
28 #include <set>
29 
30 namespace crn
31 {
32  class MatrixDouble;
33  class SquareMatrixDouble;
34 
35  /****************************************************************************/
46  namespace LinearSystem
47  {
49  MatrixDouble Cramer(const SquareMatrixDouble &Coefficients, const MatrixDouble &ConstantTerms);
51  MatrixDouble GaussJordan(const SquareMatrixDouble &Coefficients, const MatrixDouble &ConstantTerms);
52  }
53 
54  /****************************************************************************/
64  namespace QuadraticEquation
65  {
67  double Discriminant(double a, double b, double c) noexcept;
69  std::set<double> RealRoots(double a, double b, double c) noexcept;
70  }
71 }
72 #endif
double Discriminant(double a, double b, double c) noexcept
Discriminant of trinom .
MatrixDouble GaussJordan(const SquareMatrixDouble &Coefficients, const MatrixDouble &ConstantTerms)
Resolution of linear equation system by the pivot method.
std::set< double > RealRoots(double a, double b, double c) noexcept
Real roots of trinom .
double matrix class
MatrixDouble Cramer(const SquareMatrixDouble &Coefficients, const MatrixDouble &ConstantTerms)
Resolution of linear equation system by the determinant method.
Square double matrix class.