#include <PolySolver.h>
Inheritance diagram for mcPolySolver:
The classes derived from this one, are able to isolate the unknowns from equations which can be written in this form:
a_1*x^n + a_2*x^(n-1) + a_3*x^(n-2) ..... + a_n*x^0 = 0
Definition at line 60 of file PolySolver.h.
Public Member Functions | |
mcPolySolver () | |
virtual | ~mcPolySolver () |
bool | math_SolveLine (mcMathLine &p, const mcSymbolProperties *unk, mcSystemStepArray &) |
Prepares the given line for real solving, determines the degree of the given symbol and calls the right solver for the supported equations degrees. | |
bool | math_SolveLineFirstDegree (mcMathLine &p, const mcSymbolProperties *unk, mcSystemStepArray &steps) |
Solves equations of the first degree. | |
bool | math_SolveLineSecondDegree (mcMathLine &p, const mcSymbolProperties *unk, mcSystemStepArray &steps) |
Solves equations of the second degree. | |
bool | math_WorksOn (const mcMathOrSystem &m) const |
Checks that the given data contains a polynomial equation. | |
void | math_FindPolyCoeff (const mcMathLine &data, const mcSymbolProperties *unk, int n) |
Fills the m_pCoeff array with the coefficient for the unk symbol, up to the n-th degree. | |
void | math_GetPolyCoeff (mcMathLine &p, const mcSymbolProperties *unk, mcSystemStepArray &steps) |
A powerful version of math_FindPolyCoeff: simplifies, moves the data and calls automatically math_FindPolyCoeff. | |
bool | math_isReady () const |
A mcPolySolver is always ready to work... | |
wxPanel * | gui_GetOptionsPanel () const |
A mcPolySolver does not need any special setting. | |
Protected Member Functions | |
void | math_ResetCoeffArr () |
void | math_DeleteCoeffArr () |
Protected Attributes | |
mcMonomial | m_pCoeff [mcPOLYSOLVER_MAXDEGREE] |
The array of the coefficients of the unknowns. |
|
Definition at line 73 of file PolySolver.cpp. References math_ResetCoeffArr(), and mcST_POLYNOMIAL. |
|
Definition at line 77 of file PolySolver.h. References math_DeleteCoeffArr(). |
|
A mcPolySolver does not need any special setting.
Implements mcSolver. Definition at line 111 of file PolySolver.h. |
|
Definition at line 91 of file PolySolver.cpp. References math_ResetCoeffArr(). Referenced by math_FindPolyCoeff(), math_SolveLine(), and ~mcPolySolver(). |
|
Fills the m_pCoeff array with the coefficient for the
Definition at line 161 of file PolySolver.cpp. References m_pCoeff, and math_DeleteCoeffArr(). Referenced by math_GetPolyCoeff(), and math_SolveLineSecondDegree(). |
|
A powerful version of math_FindPolyCoeff: simplifies, moves the data and calls automatically math_FindPolyCoeff.
Definition at line 175 of file PolySolver.cpp. References mcElement::data_Check(), mcSolver::math_DoCompleteSimplification(), math_FindPolyCoeff(), mcEmptyPolynomial, mcEXPSIM_KEEP_FACTORIZATION, mcEXPSIM_NOFLAGS, mcMATHLOG, and mcPOLYSOLVLOG. Referenced by math_SolveLineFirstDegree(). |
|
A mcPolySolver is always ready to work...
Implements mcSolver. Definition at line 108 of file PolySolver.h. |
|
Definition at line 85 of file PolySolver.cpp. References m_pCoeff, mcEmptyElement, and mcPOLYSOLVER_MAXDEGREE. Referenced by math_DeleteCoeffArr(), and mcPolySolver(). |
|
Prepares the given line for real solving, determines the degree of the given symbol and calls the right solver for the supported equations degrees.
Implements mcSolver. Definition at line 113 of file PolySolver.cpp. References mcValue::GetInt(), mcValue::isValid(), math_DeleteCoeffArr(), math_SolveLineFirstDegree(), math_SolveLineSecondDegree(), mcASSERT, mcLOG, mcMATHLOG, mcPOLYSOLVER_MAXDEGREE, mcTXT, and mcTXTP. |
|
Solves equations of the first degree.
Definition at line 225 of file PolySolver.cpp. References m_pCoeff, mcSolver::math_DoCompleteSimplification(), math_GetPolyCoeff(), mcElement::math_SimpleDivideBy(), mcEmptyMonomial, mcEXPSIM_NOFLAGS, mcPOLYSOLVLOG, and mcTXT. Referenced by math_SolveLine(), and math_SolveLineSecondDegree(). |
|
|
Checks that the given data contains a polynomial equation.
Implements mcSolver. Definition at line 98 of file PolySolver.cpp. References mcMathType::m_tMath1, mcMathType::m_tMath2, mcElement::math_GetMathType(), mcMSTL1_EQUATIONS, mcMTL1_POLYNOMIAL, and mcMTL2_ALGEBRAIC. |
|
The array of the coefficients of the unknowns. The m_pCoeff[0] entry contains the coefficient of #m_pCurrUnk raised to one. Definition at line 67 of file PolySolver.h. Referenced by math_FindPolyCoeff(), math_ResetCoeffArr(), math_SolveLineFirstDegree(), and math_SolveLineSecondDegree(). |
[ Top ] |