#include <Polynomial.h>
Inheritance diagram for mcPolynomialHelpers:
With this class, the user can type an infinite (up to RAM memory limits) sequence of mcElements. The class is also capable to manage empty boxes... mcPolynomial is one of the most important class of MathCore; in short, what mcPolynomial does, is managing an array of mcElement derived classes letting user to add, remove or modify them...
Definition at line 70 of file Polynomial.h.
Public Member Functions | |
int | gui_GetSpaceBetweenRatio () const |
mcPolynomials have different space between ratio from mcMonomials... | |
mcPolynomialHelpers () | |
virtual | ~mcPolynomialHelpers () |
int | math_GetIdxFromEntry (const mcArrayEntry *p) const |
int | math_GetMonomialIdxFromEntry (const mcArrayEntry *p) const |
void | data_DeepCopy (const mcElementHelpers *e) |
Deep copies all the info contained in this class. | |
wxXml2Node | io_GetMathML (bool bGetPresentation) const |
Returns the MathML code for this element as presentation markup (http://www.w3.org/TR/MathML2/chapter3.html) or as content markup (http://www.w3.org/TR/MathML2/chapter4.html). | |
wxString | io_GetInlinedExpr () const |
Returns the inlined expression for this element as a wxString. | |
bool | io_ImportPresentationMathML (wxXml2Node tag, wxString &pErr) |
Imports presentation MathML reading the contents of the given XML node (without modifying it). | |
bool | io_ImportInlinedExpr (const wxString &todecode, int *, wxString &pErr, int mlimit) |
bool | io_ImportInlinedExpr (const wxString &todecode, int *p, wxString &pErr) |
Imports an inlined expression. | |
Monomial utilities | |
mcElementArrayHelpers::data_XXXX-like functions specialized for mcMonomials. | |
int | data_AddNewMonomialContaining (mcElement *contents, int count=1, int pos=-1, bool bOverwrite=FALSE) |
Creates a new monomial containing the given array of elements, and then adds it to this polynomial. | |
int | data_AddNewMonomialContaining (mcElement &monomialinit, int pos, bool bOverwrite=FALSE) |
Creates a new monomial containing only the given pointer. | |
int | data_AddNewMonomial (const mcMonomial &toinsert, int pos=-1, bool bOverwrite=FALSE) |
Inserts at pos (a copy of) the given monomial. | |
void | data_AddNewEmptyBox (int pos) |
Exactly like data_AddNewEmptyMonomial. | |
int | data_AddNewEmptyMonomial (int pos=-1) |
Adds an empty monomial to the array in the given position. | |
mcElement & | data_AddNewWrappedElement (mcElementType t, bool bOverwrite=FALSE, int pos=-1) |
Inserts at pos an element of type t , eventually overwriting (if bOverwrite == TRUE) the previous element. | |
int | data_FindMonomialContaining (int occ, const mcElement &elem) const |
Returns the index of the monomial containing the given pointer. | |
void | data_DetachAndShiftMonomial (int n) |
Detaches the n-th element of the array, which *must* be a monomial, with its associated sign (if present). | |
virtual bool | data_isWrappingOnly (mcElementType t) const |
Returns TRUE if this array is containing only an element of the given type. | |
virtual const mcElement & | data_GetWrapped (mcElementType t) const |
Returns the element of type t wrapped by this element, if it does exist and it is the only element wrapped by this array; returns NULL otherwise. | |
Special functions | |
bool | data_CreateFirstOp () |
Creates, if necessary, the first operator of this array. | |
void | data_DeleteFirstOp () |
Deletes, if present, the first operator of this array. | |
bool | data_ReplaceParentheses (bool bMoveAtBracketEnd) |
Searches a pairs of mcParenthesis and, if possible, replaces them with mcBrackets. | |
bool | data_ReplaceParentheses (int, int, int, int, bool) |
void | data_ReplaceAllParentheses () |
Searches *all* the pairs of mcParentheses which can be replaced by mcBrackets and replaces them. | |
mcElement overloaded functions | |
bool | gui_isBeginKey (const mcKey &) const |
This function should never be called (except by MathCore::isCharBeginChar()) because mcMonomials should always be a member variable of some other class; this class cannot be allocated by the user. | |
int | gui_ExDraw (wxDC &dc, int x, int y, long flags, const wxPoint &pt, int cl) const |
Like mcElement::gui_Draw, but you can specify a center line to use to calculate the cursor position. | |
void | gui_ExOnSelect (wxDC &dc, wxRect &rc, int cl) |
Like mcElement::gui_OnSelect, but you can specify a center line to use to calculate the cursor position. | |
mcInputRes | gui_BackInput (const mcKey &key, mcElement *pnewelem, int n) |
Handles the returned codes of the mcMonomial::gui_Input() function: mcIR_DELETE_THIS, mcIR_REPLACE_THIS and mcIR_DELETE_PREVIOUS, mcIR_DELETE_NEXT. | |
mcInputRes | gui_Input (const mcKey &key, mcElement *pnewelem) |
Handles two different mcPolynomialGUI-specific problems: 1) first operator 2) mcParenthesis replacement with mcBracket. | |
mcInsertRes | gui_Insert (const mcElement &toinsert, mcElement *) |
Inserts the given element at the right of the cursor position. | |
void | gui_DoSplit (mcElementType type, const mcKey &ev) |
gui_Splits the currently focused elements in two parts, inserting a new element of the given type and subtype between those two parts | |
void | gui_SetCursorPos (const mcCursorPos &code) |
Sets the cursor position inside the element using Cursor Position flags. | |
void | gui_OnSelect (wxDC &dc, wxRect &rc) |
This function is called when the bounding box of this element intersects with the selection rectangle created by the user with the mouse cursor. | |
int | gui_Draw (wxDC &dc, int x, int y, long flags, const wxPoint &pt) const |
element must be drawn with mcElementHelpers::sgui_m_pActivationBrush background brush; if this pointer is equal to mcDRW_NONACTIVE, the function must simply draw everything with default transparent mode; if the pointer is not one of the previous values, the function must use the pointer to find the subelement where it lies. | |
mcPolynomial functions | |
bool | gui_isArrEndKey (const mcKey &) const |
See io_isBeginChar function. | |
bool | gui_isArrayEmpty () |
Returns TRUE if the array doesn't contain elements or it contains only the first operator without any elements following it.... | |
void | gui_CheckCursorPos () const |
Checks the cursor position. | |
void | gui_OnNewParenthesis (bool leftpar) |
This functions sets the #m_bRemoveParenthesis flag and thus allow the mcPolynomial::gui_Input() function to remove the parentheses the next time the function is run... | |
void | gui_SetBracketToReplace (const mcBracket &p, bool leftpar) |
void | gui_ReplaceBracket (const mcBracket &, bool left) |
math_Finds the given mcBracket and then replaces it with a left (if left == TRUE) mcParenthesis or right (if left == FALSE) mcParenthesis... | |
int | gui_AddNewElement (mcElementType type, const mcKey &key, int pos=-1) |
Creates a new element of the type & subtype, sends it the given start key and adds it to the array in the specified position. | |
void | gui_AddNewEmptyMonomial (int pos=-1) |
Monomial-specific functions | |
Functions which work with the monomials of the array. | |
virtual int | math_GetCount () const |
Returns the number of the monomials contained in the array. | |
const mcMonomial & | math_Get (int n) const |
Returns the n-th monomial of the array. | |
mcMonomial & | math_Get (int n) |
virtual bool | math_isWrappingOnly (mcElementType t) const |
Returns TRUE if this array is containing only an element of the given type. | |
virtual const mcElement & | math_GetWrapped (mcElementType t) const |
Returns the element of type t wrapped by this element, if it does exist and it is the only element wrapped by this array; returns NULL otherwise. | |
int | math_FindMonomialContaining (const mcElement &elem, int occ=0, int *n=NULL) const |
Returns the math-index of the monomial containing the given pointer. | |
const mcMonomial & | math_GetMonomialContaining (const mcElement &elem, int occ=0, int *n=NULL) const |
Returns the monomial containing the occ-th occurrence of the given element. | |
mcMonomial | math_GetCoeffOf (int mathidx, const mcElement *toremove, int ntoremove) const |
Returns the mathidx-th monomial without all the elements of the toremove array (which must be of size ntoremove ) that are #Delete()d. | |
mcMonomial | math_GetCoeffOf (const mcSymbolProperties *sym, const mcPolynomial &exp, int occ=0) const |
Returns the coefficient of the occ-th occurrence of the monomial containing a mcSymbol linked to the given mcSymbolProperties object and with the given polynomial as exponent. | |
mcMonomial | math_GetCoeffOf (const mcSymbolProperties *sym, const mcRealValue &exp, int occ=0) const |
Works like #GetCoeffOf(mcSymbolProperties *, const mcPolynomial &, int) but automatically creates the polynomial to use as exponent initializing it with the given mcRealValue. | |
bool | math_isFactorized () const |
Returns TRUE if this polynomial contains only a single monomial and thus it contains only factors. | |
bool | math_isFirstMonomialNegative () const |
Returns TRUE if the sign of the first monomial is negative. | |
void | math_Factorize (int *n, int count) |
Acts so. | |
void | math_FactoreOut (int *n, int count, bool bForceUseless) |
void | math_FactoreOutAll (bool bForceUseless) |
void | math_FactoreOut (const mcSymbolProperties *unk, const mcPolynomial &pol, bool bForceUseless) |
void | math_FactoreOutFreeOf (const mcSymbolProperties *unk, const mcPolynomial &pol, bool bForceUseless) |
void | math_FactoreOut (const mcSymbolArray *arr) |
void | math_FactoreOutUnknowns () |
void | math_FactoreOutParameters () |
void | math_FactoreOutConstants () |
mcArrayEntry | math_EmbedInBracket (int *n, int count) |
mcArrayEntry | math_GetIndexOf (int occ, const mcMonomial &tofind, bool positivesign) const |
This function works like mcElementArrayHelpers::math_GetIndexOf but accepts another parameter, "positivesign" which allows the caller to search for a monomial with the specified sign. | |
mcExpSimRes | math_HandleExpSimFlag (mcExpSimRes r, mcElement *pnew, int i) |
Handles the given simplification flag returned by the i-th element of this array. | |
mcElementArrayMath abstract function implementation | |
Implements those functions defined as pure virtual by parent class. | |
int | math_DataToMathIdx (int dataindex) const |
Converts from data-index to math-index. | |
int | math_MathToDataIdx (int mathindex) const |
Converts from math-index to data-index. | |
mcElementType | math_GetNeutralOpType () const |
double | math_GetNeutralValue () const |
mcPolynomial | math_GetPolynomialWrapper () const |
Returns a new mcPolynomial containing *this array. | |
mcArrayEntry | math_WrapMonomial (const mcMonomial &) |
mcArrayEntry | math_WrapSimple (const mcElement &) |
mcElementArray | math_CreateWrapperFor (const mcElement &p) const |
Returns a new mcElementArray element which wraps the given element. | |
mcIntegerValue | math_GetMaxDegreeFor (const mcSymbolProperties *) const |
Returns the maximum degree for the given symbol retrieved by all the monomials contained in this array. | |
Sign-management | |
Functions working on the operators preceding mcMonomials. | |
int | math_GetSign (int n) const |
Returns the sign of the n-th monomial (-1 if negative, 1 if positive). | |
const mcNumber & | math_GetNumSign (const mcMonomial &m, int occ=0) const |
Returns mcNumber::math_pOne/mcNumber::math_pMinusOne if the occ-th occurrence of m is positive/negative. | |
void | math_SetSign (int n, int sgn) |
Sets the sign of the n-th monomial to sgn. | |
void | math_ChangeSign (int n) |
Changes the sign of the n-th monomial. | |
void | math_ChangeAllSigns () |
Changes the sign of all the monomials of the array. | |
void | math_SyncCoeffWithSigns () |
Synchronizes the coefficients of all monomials with the mcAddSubOp placed immediately before them. | |
void | math_PackSign (mcMonomial &m, int occ=0) const |
Packs the sign of the given monomial reading the sign of the occ-th monomial identic to it belonging to this array. | |
bool | math_DeleteFirstOp () |
Deletes the first operator of the array, if present and if it is a mcAddOp. | |
gui_Selection-related math functions | |
Function working on the selected portions of elements only. | |
int | math_GetSelCount () const |
int | math_GetSelIndex (int n) const |
const mcMonomial & | math_GetSel (int n) const |
mcMonomial & | math_GetSel (int n) |
void | math_DeleteSelection () |
mcElementMath abstract functions | |
Implementation of common math functions. | |
mcBasicOpRes | math_Add (const mcElement &, mcElement *p, bool add) |
Sums or subtracts this element with the given e element. | |
mcBasicOpRes | math_Subtract (const mcElement &, mcElement *p) |
math_s two mcElements of the same type and stores the result in this object. | |
mcBasicOpRes | math_MultiplyBy (const mcElement &, mcElement *p) |
Multiplies two mcElements of the same type and stores the result in this object. | |
mcBasicOpRes | math_DivideBy (const mcElement &, mcElement *p) |
Divides two mcElements of the same type and stores the result in this object. | |
mcMonomial | math_GetLCM (const mcElement &p) const |
Returns the LCM between *this and the given element. | |
mcMonomial | math_GetGCD (const mcElement &p) const |
mcMonomial | math_GetGCDFor (int *n, int count) const |
mcExpSimRes | math_Simplify (long flags, mcElement *newelem) |
Simplifies this element one "step"; that is, after one call to this function the element must be slightly changed. | |
mcExpSimRes | math_Simplify (long flags) |
A mcElementArray will never use the argument of the standard mcElement::math_Simplify(long flags) function, because it will never return mcESR_REPLACE_THIS flag... | |
mcIntegerValue | math_RaiseGetCoeff (int *indexes, int m) |
bool | math_CanBeRaisedTo (const mcPolynomial &) const |
void | math_RaiseTo (const mcRealValue &n) |
mcBasicOpRes | math_RaiseTo (const mcPolynomial &) |
Raises *this element to the given polynomial. | |
virtual int | math_GetOrderPos () const |
This function is used by mcPolynomial on general elements but it does not make sense for mcPolynomial itself: they should never be "reordered". | |
Public Attributes | |
bool | mgui_bRemoveParenthesis |
A special flag used by gui_Input() to search & remove parentheses only when new ones are added... | |
bool | mgui_bMoveCursorAtBracketBegin |
mcElement | mgui_pBracketToReplace |
bool | mgui_bRemoveLeftParenthesis |
Static Public Attributes | |
static int | sgui_nSpaceBetween = 2 |
A value that, divided by the exponent depth of this element, gives the number of pixels to leave between all elements. | |
static mcPolynomial * | smath_pOne = NULL |
A mcPolynomial containing a mcNumber with "1.0" as content... | |
static mcPolynomial * | smath_pEmpty = NULL |
An empty mcPolynomial. | |
Protected Member Functions | |
void | gui_Init () |
Inits the GUI section of this element. | |
int | data_GetIdxFromEntry (const mcArrayEntry *p) const |
int | data_GetMonomialIdxFromEntry (const mcArrayEntry *p) const |
mcElement & | data_GetRefFromEntry (const mcArrayEntry *p) |
mcExpSimRes | math_Reorder () |
Reorders (tries to reorder) the array for the first unknown this polynomial contains (if possible):. | |
void | math_DistributeBracket (int mdataidx, int bridx) |
Expands the bracket placed in the "bridx" math entry of the monomial placed in the "mdataidx" entry (expressed in data-coords). | |
virtual void | math_EndSimSteps () |
See the topic "Sign management in mcPolynomial". | |
virtual void | math_EndExpSteps () |
See the topic "Sign management in mcPolynomial". | |
mcExpSimRes | math_SimplifySolveOp (long flags) |
See the topic "Sign management in mcPolynomial". | |
Private Member Functions | |
mcDEFINE_REFERENCE_DATA (mcPolynomial, mcET_POLYNOMIAL) |
|
Definition at line 111 of file Polynomial.h. |
|
Definition at line 112 of file Polynomial.h. |
|
Exactly like data_AddNewEmptyMonomial.
Reimplemented from mcElementArrayHelpers. Definition at line 203 of file Polynomial.h. |
|
Adds an empty monomial to the array in the given position.
Definition at line 1141 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddElements(), mcElementArray::data_AddNewElement(), mcElement::data_AddProperty(), mcElementHelpers::data_Check(), mcElementArrayHelpers::data_GetCount(), mcEP_INITIALIZED, and mcET_EMPTYBOX. |
|
Inserts at This is a specialized version of data_AddElements.
Definition at line 198 of file Polynomial.h. References mcExpContainer::data_AddElements(). |
|
Creates a new monomial containing only the given pointer. This function is exactly like the previous one, just specialized for the creation of a monomial containing a single element.
Definition at line 191 of file Polynomial.h. |
|
Creates a new monomial containing the given array of elements, and then adds it to this polynomial. Returns the index of the new monomial.
Definition at line 275 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddElements(), mcElementArray::data_AddElements(), and mcASSERT. Referenced by data_AddNewWrappedElement(). |
|
Inserts at
Reimplemented from mcElementArrayHelpers. Definition at line 244 of file Polynomial.cpp. References data_AddNewMonomialContaining(), mcElementArray::data_Get(), mcElementArrayHelpers::data_Get(), mcElementHelpers::data_NewElem(), mcASSERT, mcEmptyElement, and mcET_MONOMIAL. |
|
Creates, if necessary, the first operator of this array. Usually, when the first monomial is positive, then it is not present in the array which begins immediately with that monomial. This function forces the array to have an operator as first entry, even if it is a mcAddOp.
Definition at line 224 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddNewOp(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemRight(), and mcET_ADDOP. Referenced by math_Reorder(). |
|
Deep copies all the info contained in this class. The mcElement implementation should be enough because all the element's data should be contained inside the associated mcElementData derived class. In fact, mcElementData does not provide a standard implementation of the DeepCopy() function. mcElement-derived classes, instead, should not contain any other variable, so this function should be enough.... Reimplemented from mcElementArrayHelpers. Definition at line 162 of file Polynomial.h. References mcElementArrayHelpers::data_DeepCopy(), mgui_bMoveCursorAtBracketBegin, mgui_bRemoveLeftParenthesis, and mgui_bRemoveParenthesis. Referenced by math_RaiseTo(). |
|
Deletes, if present, the first operator of this array. This function removes the first operator even if it is not a mcAddOp; so be careful to call this function !! Definition at line 236 of file Polynomial.cpp. References mcElementArrayHelpers::data_DeleteFirst(), mcElementArrayHelpers::data_isArrayEmpty(), and mcElementArrayHelpers::data_isOp(). |
|
Detaches the n-th element of the array, which *must* be a monomial, with its associated sign (if present). This function also shifts the array filling the holes left by the detachment. Definition at line 259 of file Polynomial.cpp. References mcElementArrayHelpers::data_Detach(), mcElementArrayHelpers::data_Get(), mcElementHelpers::data_GetType(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemLeft(), mcASSERT, and mcET_MONOMIAL. |
|
Returns the index of the monomial containing the given pointer. This function works like data_GetIndexOf but it does not search directly inside the array of this polynomial: it searchs inside the monomials contained in this array...
Definition at line 683 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_GetIndexOf(), mcElementHelpers::data_GetType(), and mcET_MONOMIAL. |
|
Implements mcElementArrayHelpers. Definition at line 129 of file Polynomial.h. |
|
Definition at line 131 of file Polynomial.h. |
|
Implements mcElementArrayHelpers. Definition at line 134 of file Polynomial.h. References mcElement::data_GetType(), mcASSERT, and mcET_MONOMIAL. |
|
Returns the element of type
Reimplemented from mcElementArrayHelpers. Definition at line 186 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetElemOfType(), mcElementHelpers::data_GetType(), data_isWrappingOnly(), mcEmptyElement, and mcET_MONOMIAL. |
|
Returns TRUE if this array is containing only an element of the given type.
Reimplemented from mcElementArrayHelpers. Definition at line 166 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), mcElementHelpers::data_GetType(), and mcET_MONOMIAL. Referenced by data_GetWrapped(), and gui_Input(). |
|
Searches *all* the pairs of mcParentheses which can be replaced by mcBrackets and replaces them. If this function is called when GUI section is active, a call to gui_SetCursorPos(mcCP_END) is strongly suggested. Definition at line 546 of file Polynomial.cpp. References data_ReplaceParentheses(). Referenced by io_ImportInlinedExpr(). |
|
|
Searches a pairs of mcParenthesis and, if possible, replaces them with mcBrackets.
Definition at line 475 of file Polynomial.cpp. References mcElementArray::data_Get(), mcElementArrayHelpers::data_Get(), mcElementArray::data_GetCount(), mcElementArrayHelpers::data_GetCount(), mcElement::data_GetType(), mcElementHelpers::data_GetType(), mcParenthesis::data_isLeftBracket(), mcET_MONOMIAL, and mcET_PARENTHESIS. Referenced by data_ReplaceAllParentheses(), and gui_Input(). |
|
Creates a new element of the type & subtype, sends it the given start key and adds it to the array in the specified position.
Reimplemented from mcElementArrayHelpers. Definition at line 760 of file Polynomial.cpp. References mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemRight(), mcElementArrayHelpers::gui_AddNewElement(), gui_AddNewEmptyMonomial(), mcElementHelpers::gui_RecalcSize(), mcASSERT, mcET_ADDOP, mcET_MONOMIAL, and mcET_SUBOP. Referenced by gui_AddNewEmptyMonomial(). |
|
Definition at line 1160 of file Polynomial.cpp. References mcElementArrayHelpers::data_GetCount(), gui_AddNewElement(), and mcET_MONOMIAL. Referenced by gui_AddNewElement(), and gui_BackInput(). |
|
Handles the returned codes of the mcMonomial::gui_Input() function: mcIR_DELETE_THIS, mcIR_REPLACE_THIS and mcIR_DELETE_PREVIOUS, mcIR_DELETE_NEXT.
Implements mcElementArrayHelpers. Definition at line 871 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddElements(), mcElementHelpers::data_Check(), mcElementArrayHelpers::data_Delete(), mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemLeft(), mcElementArrayHelpers::data_MoveElemRight(), mcMathCore::Get(), gui_AddNewEmptyMonomial(), gui_CheckCursorPos(), mcElement::gui_MergeWith(), gui_SetBracketToReplace(), mcElement::gui_SetCursorPos(), mcASSERT, mcCP_BEGIN, mcCP_END, mcEmptyElement, mcET_BRACKET, mcIR_DELETE_NEXT, mcIR_DELETE_PREVIOUS, mcIR_DELETE_THIS, mcIR_DISTRIBUTE, mcIR_OKAY, mcIR_REPLACE_THIS, mcUNUSED, and mcMathCore::SyntaxError(). |
|
Checks the cursor position. If the cursor is not in the right position, the program stops. Implements mcElementArrayHelpers. Definition at line 1081 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArrayHelpers::data_isEmptyEntry(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_isValidElem(), mcElementArrayHelpers::gui_GetCursorPos(), and mcASSERT. Referenced by gui_BackInput(), and gui_Input(). |
|
gui_Splits the currently focused elements in two parts, inserting a new element of the given type and subtype between those two parts
Implements mcElementArrayHelpers. Definition at line 1110 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddNewOp(), mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_MoveElemRight(), mcElementArrayHelpers::data_Set(), mcElement::gui_Split(), mcASSERT, mcEmptyElement, mcET_ADDOP, mcET_SUBOP, and mcUNUSED. |
|
element must be drawn with mcElementHelpers::sgui_m_pActivationBrush background brush; if this pointer is equal to mcDRW_NONACTIVE, the function must simply draw everything with default transparent mode; if the pointer is not one of the previous values, the function must use the pointer to find the subelement where it lies. Then, only the subelement's gui_Draw() function must be called with the initial pointer. The subelements must be called with mcDRW_ALLACTIVE flag only for special reasons.
Reimplemented from mcElementArrayHelpers. Definition at line 331 of file Polynomial.h. |
|
Like mcElement::gui_Draw, but you can specify a center line to use to calculate the cursor position.
Definition at line 721 of file Polynomial.cpp. References mcElementArrayHelpers::gui_DrawSelection(), mcElementArrayHelpers::gui_ExDraw(), mcElementArrayHelpers::gui_GetSelElemCount(), mcDRW_ALLOW_TOTAL_SELECTION, mcDRW_NOACTIVEELEM, mcGUILOG, and mcTXTTHIS. |
|
Like mcElement::gui_OnSelect, but you can specify a center line to use to calculate the cursor position.
Reimplemented from mcElementArrayHelpers. Definition at line 747 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::gui_ExOnSelect(), mcElementArrayHelpers::gui_GetSelEnd(), mcElementArrayHelpers::gui_GetSelStart(), mcElementHelpers::gui_isAllSelected(), and mcElement::gui_SelectAll(). |
|
mcPolynomials have different space between ratio from mcMonomials...
Reimplemented from mcElementArrayHelpers. Definition at line 82 of file Polynomial.h. References mcElement::gui_GetExpDepth(). |
|
Inits the GUI section of this element.
Reimplemented from mcElementArrayHelpers. Definition at line 116 of file Polynomial.h. References mcElementArrayHelpers::gui_Init(). |
|
Handles two different mcPolynomialGUI-specific problems: 1) first operator 2) mcParenthesis replacement with mcBracket.
Reimplemented from mcElementArrayHelpers. Definition at line 808 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddNewElement(), mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_isOp(), data_isWrappingOnly(), data_ReplaceParentheses(), gui_CheckCursorPos(), mcElementHelpers::gui_DeepRecalcSize(), mcElementArrayHelpers::gui_GetCursorPos(), mcElementArrayHelpers::gui_Input(), mcElementHelpers::gui_isKeyBeginKey(), gui_OnNewParenthesis(), mcElementHelpers::gui_RecalcSize(), mcElement::gui_RecalcSize(), gui_ReplaceBracket(), mcEmptyElement, mcET_ADDOP, mcET_EMPTYBOX, mcET_PARENTHESIS, mcET_SUBOP, mcIR_OKAY, mgui_bMoveCursorAtBracketBegin, mgui_bRemoveLeftParenthesis, mgui_bRemoveParenthesis, and mgui_pBracketToReplace. |
|
Inserts the given element at the right of the cursor position.
Implements mcElementHelpers. Definition at line 1048 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::gui_GetCursorPos(), mcElement::gui_Insert(), and mcINSR_OKAY. |
|
Returns TRUE if the array doesn't contain elements or it contains only the first operator without any elements following it.... This function is different from mcElementArray::data_isArrayEmpty(): it also checks for the first operator presence/absence. Definition at line 714 of file Polynomial.cpp. References mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_isArrayEmpty(), and mcElementArrayHelpers::data_isOp(). |
|
See io_isBeginChar function.
Implements mcElementArrayHelpers. Definition at line 345 of file Polynomial.h. |
|
This function should never be called (except by MathCore::isCharBeginChar()) because mcMonomials should always be a member variable of some other class; this class cannot be allocated by the user.
Implements mcElementHelpers. Definition at line 290 of file Polynomial.h. |
|
This functions sets the #m_bRemoveParenthesis flag and thus allow the mcPolynomial::gui_Input() function to remove the parentheses the next time the function is run...
Definition at line 360 of file Polynomial.h. Referenced by gui_Input(). |
|
This function is called when the bounding box of this element intersects with the selection rectangle created by the user with the mouse cursor. The standard implementation just selects this element. If you are implementing a container element, you must override this function and check contained elements' bounding boxes and then call the gui_OnSelect() function of the contained elements whose bounding boxes intersect the given selection rectangle. Reimplemented from mcElementArrayHelpers. Definition at line 326 of file Polynomial.h. |
|
|
Definition at line 365 of file Polynomial.h. Referenced by gui_BackInput(). |
|
Sets the cursor position inside the element using Cursor Position flags. When it's called to set the cursor at the end of the base, code==mcCP_END and data_hasProperty(mcEP_HASEXPONENT) == FALSE, when it's called to set the cursor at the beginning of the base, code==mcCP_BEGIN. The function doesnt need to care for the third Cursor Position flag: mcCP_INSIDE, actually this function will never be called with this code. Reimplemented from mcElementArrayHelpers. Definition at line 1073 of file Polynomial.cpp. |
|
Returns the inlined expression for this element as a wxString. "Inlined expression" means a math representation of the data in a single line: to allow such a restriction (everything must be on one text line), some standard conventions (and many brackets !!!) are used:
Reimplemented from mcElementArrayHelpers. Definition at line 1221 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), and mcElement::io_GetInlinedExpr(). |
|
Returns the MathML code for this element as presentation markup (http://www.w3.org/TR/MathML2/chapter3.html) or as content markup (http://www.w3.org/TR/MathML2/chapter4.html).
Implements mcElementHelpers. Definition at line 1183 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), and mcElement::io_GetMathML(). |
|
Imports an inlined expression.
"Inlined expression" means a string containing an encoded representation of math data: 234^2*ax+6y/2=0 is an inlined expression. This is the form which is used to input and output math data by a lot of math programs. Compability with these programs is crucial. However, because of the nature of this representation, the algorithm which recognizes (through io_isBeginChar functions) the elements to create, needs to know the lenght of the token which encodes this element; this is accomplished with the
Implements mcElementHelpers. Definition at line 652 of file Polynomial.h. References mcElement::io_ImportInlinedExpr(). |
|
|
Imports presentation MathML reading the contents of the given XML node (without modifying it).
This function is called only if io_isBeginTag function returns a positive value for the name of parent tag of
Implements mcElementHelpers. Definition at line 1241 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddElements(), mcElementArrayHelpers::data_DeleteAll(), and mcElement::io_ImportPresentationMathML(). |
|
Sums or subtracts this element with the given A unique function for add/subtract operations is used because the algorithms used to handle this two operations are usually almost identic and thus this avoids a lot of repetitions. If the two elements cannot be summed, then an ASSERT should fail since before using this function, the caller should always use the math_CanBeAddedWith() function.
The function returns one of mcBasicOpRes values, eventually using the Implements mcElementHelpers. Definition at line 1865 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddNewOp(), mcElementHelpers::data_Check(), mcElementArray::data_isArrayEmpty(), mcElementArray::data_isOp(), mcElementArrayHelpers::data_Merge(), mcPolynomial::math_ChangeAllSigns(), mcElementArrayHelpers::math_SimpleAdd(), mcBOR_REMOVE_OPERAND, mcET_ADDOP, mcMATHLOG, mcTXT, and mcTXTTHIS. Referenced by mcMathMngHelpers::gui_MoveSel(). |
|
Definition at line 2023 of file Polynomial.cpp. References math_GetCount(). Referenced by math_RaiseTo(). |
|
Changes the sign of all the monomials of the array.
Definition at line 1559 of file Polynomial.cpp. References math_ChangeSign(), and math_GetCount(). Referenced by mcMathMngHelpers::gui_MoveSel(). |
|
Changes the sign of the n-th monomial.
Definition at line 567 of file Polynomial.h. Referenced by math_ChangeAllSigns(), and math_HandleExpSimFlag(). |
|
Returns a new mcElementArray element which wraps the given element.
Reimplemented from mcElementArrayHelpers. Definition at line 1423 of file Polynomial.cpp. References mcElementArrayHelpers::math_CreateWrapperFor(), mcElementArray::math_WrapSimple(), mcET_MONOMIAL, and mcET_POLYNOMIAL. |
|
Converts from data-index to math-index.
Implements mcElementArrayHelpers. Definition at line 1439 of file Polynomial.cpp. References mcElementArrayHelpers::data_CheckIndex(), and mcElementArrayHelpers::data_isOp(). Referenced by math_HandleExpSimFlag(). |
|
Deletes the first operator of the array, if present and if it is a mcAddOp. Returns TRUE if the operator was deleted or FALSE otherwise. Definition at line 1524 of file Polynomial.cpp. References mcElementArrayHelpers::data_Delete(), mcElementArrayHelpers::data_Get(), mcElementHelpers::data_GetType(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemLeft(), and math_GetNeutralOpType(). Referenced by math_Reorder(), and math_Simplify(). |
|
Definition at line 2000 of file Polynomial.cpp. References mcElementHelpers::data_Check(), and mcElementArrayHelpers::gui_DeleteSelection(). |
|
|
Divides two mcElements of the same type and stores the result in this object.
Implements mcElementHelpers. Definition at line 1961 of file Polynomial.cpp. References mcArrayEntry::data_GetFraction(), mcElementArrayHelpers::data_isArrayEmpty(), mcFraction::data_SetDen(), mcElementArrayHelpers::math_EmbedInFraction(), mcASSERT, mcBOR_REMOVE_OPERAND, mcET_POLYNOMIAL, mcMATHLOG, mcTXT, and mcTXTTHIS. |
|
|
See the topic "Sign management in mcPolynomial".
Reimplemented from mcElementArrayHelpers. Definition at line 409 of file Polynomial.h. |
|
See the topic "Sign management in mcPolynomial".
Reimplemented from mcElementArrayHelpers. Definition at line 406 of file Polynomial.h. |
|
Definition at line 2373 of file Polynomial.cpp. References mcElementArrayHelpers::data_GetCount(), math_FactoreOut(), and mcEmptyPolynomial. |
|
Definition at line 2317 of file Polynomial.cpp. References mcElementHelpers::math_ContainsSymbol(), math_FactoreOut(), math_Get(), and math_GetCount(). |
|
|
Definition at line 494 of file Polynomial.h. |
|
Definition at line 2380 of file Polynomial.cpp. References math_FactoreOut(). |
|
Definition at line 2345 of file Polynomial.cpp. References mcElementHelpers::math_ContainsSymbol(), math_FactoreOut(), math_Get(), and math_GetCount(). |
|
Definition at line 2386 of file Polynomial.cpp. References math_FactoreOut(). |
|
Definition at line 2383 of file Polynomial.cpp. References math_FactoreOut(). |
|
Acts so.
Definition at line 2233 of file Polynomial.cpp. |
|
Returns the math-index of the monomial containing the given pointer. This function is different from mcPolynomial::data_math_FindMonomialContaining because it uses the mcElementArray::math_FindElemIdx() function.
Definition at line 1633 of file Polynomial.cpp. References math_Get(), math_GetCount(), and mcElementArray::math_GetIndexOf(). Referenced by math_GetMonomialContaining(). |
|
Reimplemented from mcElementArrayHelpers. Definition at line 433 of file Polynomial.h. References mcET_MONOMIAL. |
|
Returns the n-th monomial of the array.
Reimplemented from mcElementArrayHelpers. Definition at line 431 of file Polynomial.h. References mcET_MONOMIAL. Referenced by math_EmbedInBracket(), math_FactoreOut(), math_FactoreOutFreeOf(), math_FindMonomialContaining(), math_GetCoeffOf(), math_GetGCD(), math_GetGCDFor(), math_GetIndexOf(), math_GetLCM(), math_GetMaxDegreeFor(), math_GetMonomialContaining(), math_GetWrapped(), math_isWrappingOnly(), mcMathMngHelpers::math_Move(), mcMathMngHelpers::math_MoveFreeFrom(), mcMathMngHelpers::math_MoveNonSymbol(), mcMathMngHelpers::math_MoveSymbol(), mcMathMngHelpers::math_MoveSymbols(), math_MultiplyBy(), math_RaiseTo(), math_SimplifySolveOp(), and math_SyncCoeffWithSigns(). |
|
Works like #GetCoeffOf(mcSymbolProperties *, const mcPolynomial &, int) but automatically creates the polynomial to use as exponent initializing it with the given mcRealValue.
Definition at line 1731 of file Polynomial.cpp. References math_GetCoeffOf(), and mcElementArray::math_WrapNumber(). |
|
Returns the coefficient of the occ-th occurrence of the monomial containing a mcSymbol linked to the given mcSymbolProperties object and with the given polynomial as exponent.
Definition at line 1679 of file Polynomial.cpp. References mcElementHelpers::math_Contains(), math_Get(), math_GetCount(), math_GetMonomialContaining(), mcElementArray::math_Remove(), mcElement::math_SetExp(), mcEmptyMonomial, mcMATHLOG, mcTXT, mcTXTP, and mcTXTTHIS. |
|
Returns the mathidx-th monomial without all the elements of the If the sign of the monomial is negative, then the functions packs it inside the returned monomial (i.e. multiplies by -1 the monomial). Definition at line 1663 of file Polynomial.cpp. References mcElementArray::math_Delete(), math_Get(), math_GetSign(), and math_PackSign(). Referenced by math_GetCoeffOf(). |
|
Returns the number of the monomials contained in the array. This function should always return a different value from the number of the elements contained in the array (in fact, the array contains also the + or - operators).
Reimplemented from mcElementArrayHelpers. Definition at line 427 of file Polynomial.h. References mcET_MONOMIAL. Referenced by math_CanBeRaisedTo(), math_ChangeAllSigns(), math_FactoreOut(), math_FactoreOutFreeOf(), math_FindMonomialContaining(), math_GetCoeffOf(), math_GetGCDFor(), math_GetIndexOf(), math_GetMaxDegreeFor(), math_isWrappingOnly(), math_MathToDataIdx(), mcMathMngHelpers::math_MoveAll(), mcMathMngHelpers::math_MoveFreeFrom(), mcMathMngHelpers::math_MoveNonSymbol(), mcMathMngHelpers::math_MoveSymbol(), mcMathMngHelpers::math_MoveSymbols(), math_MultiplyBy(), math_RaiseTo(), math_SimplifySolveOp(), and math_SyncCoeffWithSigns(). |
|
Implements mcElementHelpers. Definition at line 2511 of file Polynomial.cpp. References mcPolynomial::math_Get(), math_Get(), mcElement::math_GetGCD(), math_GetGCDFor(), mcPolynomial::math_isFactorized(), and math_isFactorized(). |
|
Definition at line 2238 of file Polynomial.cpp. References math_Get(), math_GetCount(), mcElement::math_GetGCD(), mcASSERT, and mcEmptyElement. Referenced by math_FactoreOut(), and math_GetGCD(). |
|
Definition at line 147 of file Polynomial.h. |
|
This function works like mcElementArrayHelpers::math_GetIndexOf but accepts another parameter, "positivesign" which allows the caller to search for a monomial with the specified sign.
Definition at line 2583 of file Polynomial.cpp. References mcElementArrayHelpers::math_Compare(), math_Get(), math_GetCount(), math_GetSign(), math_MathToDataIdx(), mcElementArrayHelpers::mcArrayEntry, mcEmptyArrayEntry, and mcMAKEPOL_IDX. |
|
Returns the LCM between *this and the given element.
Implements mcElementHelpers. Definition at line 2525 of file Polynomial.cpp. References mcElementArray::data_AddElements(), mcArrayEntry::data_GetRef(), mcElementArray::math_EmbedInBracket(), mcElementArrayHelpers::math_EmbedInBracket(), mcPolynomial::math_Get(), math_Get(), mcElement::math_GetLCM(), mcPolynomial::math_isFactorized(), math_isFactorized(), and mcElement::math_SimpleMultiplyBy(). |
|
Returns the maximum degree for the given symbol retrieved by all the monomials contained in this array. See mcMonomial::GetMaxDegreeFor for more info. Definition at line 1744 of file Polynomial.cpp. References mcIntegerValue::GetMax(), mcValue::isValid(), math_Get(), math_GetCount(), mcMonomial::math_GetMaxDegreeFor(), and mcASSERT. |
|
Returns the monomial containing the occ-th occurrence of the given element.
If not NULL, stores in Definition at line 1653 of file Polynomial.cpp. References math_FindMonomialContaining(), math_Get(), and mcEmptyMonomial. Referenced by math_FactoreOut(), and math_GetCoeffOf(). |
|
Definition at line 149 of file Polynomial.h. |
|
Implements mcElementArrayHelpers. Definition at line 531 of file Polynomial.h. References mcET_ADDOP. Referenced by math_DeleteFirstOp(). |
|
Implements mcElementArrayHelpers. Definition at line 532 of file Polynomial.h. |
|
Returns mcNumber::math_pOne/mcNumber::math_pMinusOne if the occ-th occurrence of Returns NULL if the given monomial could not be found. Definition at line 1601 of file Polynomial.cpp. References math_GetSign(), mcElementHelpers::math_NonRecursiveFindInChildren(), and mcEmptyNumber. Referenced by math_PackSign(). |
|
This function is used by mcPolynomial on general elements but it does not make sense for mcPolynomial itself: they should never be "reordered".
Implements mcElementHelpers. Definition at line 637 of file Polynomial.h. |
|
Returns a new mcPolynomial containing *this array. mcPolynomial returns a copy of themselves, mcMonomial returns a mcPolynomial containing itself. Implements mcElementArrayHelpers. Definition at line 1376 of file Polynomial.cpp. References mcElement::data_MakePrivateCopy(). |
|
Definition at line 601 of file Polynomial.h. References mcET_MONOMIAL. |
|
Definition at line 598 of file Polynomial.h. References mcET_MONOMIAL. Referenced by mcMathMngHelpers::gui_AddSubSel(), and mcMathMngHelpers::gui_MoveSel(). |
|
Definition at line 592 of file Polynomial.h. References mcET_MONOMIAL. Referenced by mcMathMngHelpers::gui_AddSubSel(), and mcMathMngHelpers::gui_MoveSel(). |
|
Definition at line 595 of file Polynomial.h. References mcET_MONOMIAL. |
|
Returns the sign of the n-th monomial (-1 if negative, 1 if positive).
Definition at line 1481 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementHelpers::data_GetType(), mcElementArrayHelpers::data_isAddSubOp(), math_MathToDataIdx(), mcASSERT, and mcET_ADDOP. Referenced by math_EmbedInBracket(), math_GetCoeffOf(), math_GetIndexOf(), math_GetNumSign(), mcMathMngHelpers::math_Move(), math_MultiplyBy(), and math_RaiseTo(). |
|
Returns the element of type
Reimplemented from mcElementArrayHelpers. Definition at line 214 of file Polynomial.cpp. References mcElementHelpers::data_GetType(), math_Get(), mcElementArray::math_GetWrapped(), math_isWrappingOnly(), and mcEmptyElement. |
|
Handles the given simplification flag returned by the i-th element of this array.
Reimplemented from mcElementArrayHelpers. Definition at line 2389 of file Polynomial.cpp. References mcElementArrayHelpers::data_Get(), mcElementArray::data_GetIndexOf(), math_ChangeSign(), math_DataToMathIdx(), math_DistributeBracket(), mcElementArrayHelpers::math_HandleExpSimFlag(), mcASSERT, mcESR_CHANGE_SIGN, mcESR_DISTRIBUTE, mcESR_NOTFINISHED, and mcET_BRACKET. |
|
Returns TRUE if this polynomial contains only a single monomial and thus it contains only factors.
Definition at line 481 of file Polynomial.h. Referenced by math_GetGCD(), and math_GetLCM(). |
|
Returns TRUE if the sign of the first monomial is negative. This is typically used by containers of mcPolynomials to decide if the sign should be changed or not. Definition at line 486 of file Polynomial.h. |
|
Returns TRUE if this array is containing only an element of the given type.
Reimplemented from mcElementArrayHelpers. Definition at line 202 of file Polynomial.cpp. References mcElementHelpers::data_GetType(), math_Get(), and math_GetCount(). Referenced by math_GetWrapped(). |
|
Converts from math-index to data-index.
Implements mcElementArrayHelpers. Definition at line 1452 of file Polynomial.cpp. References mcElementArrayHelpers::data_isOp(), math_GetCount(), mcMATHLOG, and mcTXTTHIS. Referenced by math_GetIndexOf(), math_GetSign(), and math_SetSign(). |
|
Multiplies two mcElements of the same type and stores the result in this object.
Implements mcElementHelpers. Definition at line 1902 of file Polynomial.cpp. References mcElementHelpers::data_Check(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArray::math_EmbedInBracket(), mcElementArrayHelpers::math_EmbedInBracket(), mcPolynomial::math_Get(), math_Get(), mcElementArray::math_GetCount(), math_GetCount(), math_GetSign(), mcElement::math_MultiplyBy(), mcASSERT, mcBOR_INVALID, mcBOR_REMOVE_OPERAND, mcBOR_REPLACE_BOTH, mcBOR_REPLACE_OPERAND, and mcEmptyElement. |
|
Packs the sign of the given monomial reading the sign of the occ-th monomial identic to it belonging to this array.
Definition at line 1611 of file Polynomial.cpp. References mcMonomial::math_GetCoeff(), math_GetNumSign(), mcElement::math_SimpleMultiplyBy(), mcASSERT, and mcEmptyElement. Referenced by math_GetCoeffOf(). |
|
Definition at line 2007 of file Polynomial.cpp. References mcIntegerValue::GetComb(). Referenced by math_RaiseTo(). |
|
Raises *this element to the given polynomial. Returns mcBOR_INVALID if the operation could not be performed (this is typically because the base is negative), or mcBOR_REMOVE_OPERAND if the operation was okay.
Implements mcElementHelpers. Definition at line 2170 of file Polynomial.cpp. References math_CanBeRaisedTo(), mcElementArrayHelpers::math_EmbedInBracketAndRaiseTo(), math_Get(), math_GetCount(), math_RaiseTo(), mcElement::math_RaiseTo(), and mcBOR_REMOVE_OPERAND. |
|
|
Reorders (tries to reorder) the array for the first unknown this polynomial contains (if possible):. BEFORE: 5a + 2 - x^4 + x AFTER: - x^4 + x + 5a + 2 where x is the only unknown registered. Implements mcElementArrayHelpers. Definition at line 1540 of file Polynomial.cpp. References mcElementHelpers::data_Check(), data_CreateFirstOp(), mcElementArrayHelpers::data_GetArray(), mcElementArrayHelpers::data_GetCount(), math_DeleteFirstOp(), mcElementArrayHelpers::math_ReorderElements(), mcESR_DONE, mcESR_NOTFINISHED, mcMATHLOG, and mcTXTTHIS. |
|
Sets the sign of the n-th monomial to sgn.
Definition at line 1495 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddNewOp(), mcElementArrayHelpers::data_isOp(), mcElementArrayHelpers::data_MoveElemRight(), math_MathToDataIdx(), mcASSERT, mcET_ADDOP, and mcET_SUBOP. Referenced by math_SimplifySolveOp(), and math_SyncCoeffWithSigns(). |
|
A mcElementArray will never use the argument of the standard mcElement::math_Simplify(long flags) function, because it will never return mcESR_REPLACE_THIS flag... this little function helps to write readable code. Reimplemented from mcElementArrayHelpers. Definition at line 625 of file Polynomial.h. References mcElement::math_Simplify(). |
|
Simplifies this element one "step"; that is, after one call to this function the element must be slightly changed. For example, this monomial requires three calls to math_Simplify to be completely reduced in a basic form: 12ax*3 + 4a/(x^-1) . first call to math_Simplify 36ax + 4a/(1/x) . second call 36ax + 4ax . third call 40ax
Reimplemented from mcElementArrayHelpers. Definition at line 1838 of file Polynomial.cpp. References math_DeleteFirstOp(), mcElementArrayHelpers::math_Simplify(), mcESR_DONE, and mcLOG. |
|
See the topic "Sign management in mcPolynomial".
Reimplemented from mcElementArrayHelpers. Definition at line 1762 of file Polynomial.cpp. References mcElementHelpers::data_GetInstanceOf(), mcElement::data_GetType(), mcMonomial::math_Abs(), mcOperator::math_Apply(), math_Get(), mcMonomial::math_GetCoeff(), math_GetCount(), mcElementArrayHelpers::math_GetOpPreceding(), mcElementArrayHelpers::math_HandleBasicOpRes(), math_SetSign(), mcBOR_INVALID, mcEmptyElement, mcESR_DONE, mcESR_NOTFINISHED, mcET_ADDOP, mcET_SUBOP, mcMATHLOG, and mcTXT. |
|
math_s two mcElements of the same type and stores the result in this object.
Reimplemented from mcElementHelpers. |
|
Synchronizes the coefficients of all monomials with the mcAddSubOp placed immediately before them.
Definition at line 1565 of file Polynomial.cpp. References math_Get(), mcMonomial::math_GetCoeff(), math_GetCount(), math_SetSign(), mcMATHLOG, mcTXT, and mcTXTV. |
|
Implements mcElementArrayHelpers. Definition at line 1389 of file Polynomial.cpp. References mcElementArrayHelpers::data_AddElements(), mcElementHelpers::data_Check(), mcElementArrayHelpers::data_DeleteAll(), mcElementArrayHelpers::mcArrayEntry, and mcMAKEPOL_IDX. Referenced by math_WrapSimple(). |
|
Implements mcElementArrayHelpers. Definition at line 1402 of file Polynomial.cpp. References mcElementArray::data_AddElements(), mcArrayEntry::data_SetIdx(), math_WrapMonomial(), mcET_MONOMIAL, and mcArrayEntry::mdata_idx. |
|
|
|
Definition at line 88 of file Polynomial.h. Referenced by data_DeepCopy(), and gui_Input(). |
|
Definition at line 91 of file Polynomial.h. Referenced by data_DeepCopy(), and gui_Input(). |
|
A special flag used by gui_Input() to search & remove parentheses only when new ones are added...
Definition at line 87 of file Polynomial.h. Referenced by data_DeepCopy(), and gui_Input(). |
|
Definition at line 90 of file Polynomial.h. Referenced by gui_Input(). |
|
A value that, divided by the exponent depth of this element, gives the number of pixels to leave between all elements.
Definition at line 67 of file Polynomial.cpp. |
|
An empty mcPolynomial.
Definition at line 69 of file Polynomial.cpp. |
|
A mcPolynomial containing a mcNumber with "1.0" as content...
Definition at line 68 of file Polynomial.cpp. |
[ Top ] |