Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

mcPolynomialHelpers Class Reference

#include <Polynomial.h>

Inheritance diagram for mcPolynomialHelpers:

Inheritance graph
[legend]
Collaboration diagram for mcPolynomialHelpers:

Collaboration graph
[legend]
List of all members.

Detailed Description

A general polynomial: a container of mcElements.

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.
mcElementdata_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 mcElementdata_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
Function which highly specialized tasks used by mcPolynomial algorithms.

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
Implements abstract mcElement 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
Functions which are overridden by mcElementArray or are just new.

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 mcMonomialmath_Get (int n) const
 Returns the n-th monomial of the array.
mcMonomialmath_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 mcElementmath_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 mcMonomialmath_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 mcNumbermath_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 mcMonomialmath_GetSel (int n) const
mcMonomialmath_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 mcPolynomialsmath_pOne = NULL
 A mcPolynomial containing a mcNumber with "1.0" as content...
static mcPolynomialsmath_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
mcElementdata_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)


Constructor & Destructor Documentation

mcPolynomialHelpers::mcPolynomialHelpers  )  [inline]
 

Definition at line 111 of file Polynomial.h.

virtual mcPolynomialHelpers::~mcPolynomialHelpers  )  [inline, virtual]
 

Definition at line 112 of file Polynomial.h.


Member Function Documentation

void mcPolynomialHelpers::data_AddNewEmptyBox int  pos  )  [inline, virtual]
 

Exactly like data_AddNewEmptyMonomial.

Reimplemented from mcElementArrayHelpers.

Definition at line 203 of file Polynomial.h.

int mcPolynomialHelpers::data_AddNewEmptyMonomial int  pos = -1  ) 
 

Adds an empty monomial to the array in the given position.

Returns:
The index of the new monomial.

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.

int mcPolynomialHelpers::data_AddNewMonomial const mcMonomial toinsert,
int  pos = -1,
bool  bOverwrite = FALSE
[inline]
 

Inserts at pos (a copy of) the given monomial.

This is a specialized version of data_AddElements.

Returns:
The index of the just inserted monomial.

Definition at line 198 of file Polynomial.h.

References mcExpContainer::data_AddElements().

int mcPolynomialHelpers::data_AddNewMonomialContaining mcElement monomialinit,
int  pos,
bool  bOverwrite = FALSE
[inline]
 

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.

Returns:
The index of the new monomial

Definition at line 191 of file Polynomial.h.

int mcPolynomialHelpers::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.

Returns the index of the new monomial.

Parameters:
contents The array of the mcElements to add
count The size of the array of mcElement to put in the mcMonomial
pos The position of the new monomial in the array
bOverwrite TRUE if you want to overwrite the old mcMonomial which is (eventually) placed in the given position

Definition at line 275 of file Polynomial.cpp.

References mcElementArrayHelpers::data_AddElements(), mcElementArray::data_AddElements(), and mcASSERT.

Referenced by data_AddNewWrappedElement().

mcElement & mcPolynomialHelpers::data_AddNewWrappedElement mcElementType  t,
bool  bOverwrite = FALSE,
int  pos = -1
[virtual]
 

Inserts at pos an element of type t, eventually overwriting (if bOverwrite == TRUE) the previous element.

Returns:
The reference to the just created & added element.

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.

bool mcPolynomialHelpers::data_CreateFirstOp  ) 
 

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.

Returns:
TRUE if the operator was added.

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().

void mcPolynomialHelpers::data_DeepCopy const mcElementHelpers e  )  [inline, virtual]
 

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().

void mcPolynomialHelpers::data_DeleteFirstOp  ) 
 

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().

void mcPolynomialHelpers::data_DetachAndShiftMonomial int  n  ) 
 

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.

int mcPolynomialHelpers::data_FindMonomialContaining int  occ,
const mcElement elem
const
 

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...

Returns:
The index of the monomial found or -1.

Definition at line 683 of file Polynomial.cpp.

References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), mcElementArrayHelpers::data_GetIndexOf(), mcElementHelpers::data_GetType(), and mcET_MONOMIAL.

int mcPolynomialHelpers::data_GetIdxFromEntry const mcArrayEntry p  )  const [inline, protected, virtual]
 

Implements mcElementArrayHelpers.

Definition at line 129 of file Polynomial.h.

int mcPolynomialHelpers::data_GetMonomialIdxFromEntry const mcArrayEntry p  )  const [inline, protected]
 

Definition at line 131 of file Polynomial.h.

mcElement& mcPolynomialHelpers::data_GetRefFromEntry const mcArrayEntry p  )  [inline, protected, virtual]
 

Implements mcElementArrayHelpers.

Definition at line 134 of file Polynomial.h.

References mcElement::data_GetType(), mcASSERT, and mcET_MONOMIAL.

const mcElement & mcPolynomialHelpers::data_GetWrapped mcElementType  t  )  const [virtual]
 

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.

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.

bool mcPolynomialHelpers::data_isWrappingOnly mcElementType  t  )  const [virtual]
 

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().

void mcPolynomialHelpers::data_ReplaceAllParentheses  ) 
 

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().

bool mcPolynomialHelpers::data_ReplaceParentheses int  ,
int  ,
int  ,
int  ,
bool 
 

Definition at line 290 of file Polynomial.cpp.

References mcElementArray::data_AddElements(), mcPolynomial::data_AddNewEmptyMonomial(), mcPolynomial::data_AddNewMonomialContaining(), mcElementHelpers::data_Check(), mcElement::data_Check(), mcElementArrayHelpers::data_Delete(), mcElementArray::data_Delete(), mcElementArray::data_DeleteFirst(), mcElementArray::data_DeleteLast(), mcElementArray::data_Get(), mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetArray(), mcElementArray::data_GetArray(), mcElementArray::data_GetCount(), mcElementArray::data_GetElemOfType(), mcElementArray::data_isArrayEmpty(), mcElementArrayHelpers::data_MoveElemLeft(), mcElementArray::data_MoveElemLeft(), mcExpContainer::data_SetContent(), mcExpElement::data_SetExpSub(), mcElement::gui_MoveCursor(), mcElementArray::gui_SetCursorOnElemBegin(), mcElement::gui_SetCursorPos(), mcCP_END, mcEmptyElement, mcET_MONOMIAL, mcLOG, mcMCF_NOMODIFIERS, mcMCF_RIGHT, mcTXT, and mcTXTTHIS.

bool mcPolynomialHelpers::data_ReplaceParentheses bool  bMoveAtBracketEnd  ) 
 

Searches a pairs of mcParenthesis and, if possible, replaces them with mcBrackets.

Parameters:
bMoveAtBracketEnd If TRUE, then the cursor of the monomial containing the new brackets (if GUI is enabled) is moved at the end of the bracket; otherwise, it is placed at the beginning of the bracket.
Returns:
TRUE if a pair of mcParenthesis have been replaced; FALSE if there are no valid pairs of mcParenthesis. This happens, for example, in the following cases: ((...+....-...(.... or ((...)+... [inner parentheses are hold by a mcBracket]

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().

int mcPolynomialHelpers::gui_AddNewElement mcElementType  type,
const mcKey key,
int  pos = -1
[virtual]
 

Creates a new element of the type & subtype, sends it the given start key and adds it to the array in the specified position.

Parameters:
type The class ID of the new element to add
subtype The subclass ID of the new element to add
key The first key the new element will receive
pos The position of the new element; the element (eventually) present in the pos-th entry of the array is deleted and then replaced by this new element. Use -1 to add the new element at the end of the array.
Returns:
The index of the new element in the array (this can be different from the given 'pos' variable).

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().

void mcPolynomialHelpers::gui_AddNewEmptyMonomial int  pos = -1  ) 
 

Definition at line 1160 of file Polynomial.cpp.

References mcElementArrayHelpers::data_GetCount(), gui_AddNewElement(), and mcET_MONOMIAL.

Referenced by gui_AddNewElement(), and gui_BackInput().

mcInputRes mcPolynomialHelpers::gui_BackInput const mcKey key,
mcElement pnewelem,
int  n
[virtual]
 

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().

void mcPolynomialHelpers::gui_CheckCursorPos  )  const [virtual]
 

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().

void mcPolynomialHelpers::gui_DoSplit mcElementType  type,
const mcKey ev
[virtual]
 

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.

int mcPolynomialHelpers::gui_Draw wxDC &  dc,
int  x,
int  y,
long  flags,
const wxPoint &  pt
const [inline, virtual]
 

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.

Returns:
The ID of the element marked as active (the element which is drawn with mcElementHelpers::sgui_m_pActivationBrush as background), or mcDRW_NOACTIVEELEM flag if this element does not contain the mouse cursor.

Reimplemented from mcElementArrayHelpers.

Definition at line 331 of file Polynomial.h.

int mcPolynomialHelpers::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.

Parameters:
dc The dc where this element will be drawn
x,y The coordinates where this element will be drawn
pt The mouse cursor position or one of the mcDRW_*** flags
cl The center line to use, or -1 to let the function calculate it

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.

void mcPolynomialHelpers::gui_ExOnSelect wxDC &  dc,
wxRect &  rc,
int  cl
[virtual]
 

Like mcElement::gui_OnSelect, but you can specify a center line to use to calculate the cursor position.

Parameters:
dc The dc where this element is drawn
x,y The coordinates where this element is drawn
rc The selection rectangle created by the user
cl The center line to use, or -1 to let the function calculate it

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().

int mcPolynomialHelpers::gui_GetSpaceBetweenRatio  )  const [inline, virtual]
 

mcPolynomials have different space between ratio from mcMonomials...

Reimplemented from mcElementArrayHelpers.

Definition at line 82 of file Polynomial.h.

References mcElement::gui_GetExpDepth().

void mcPolynomialHelpers::gui_Init  )  [inline, protected, virtual]
 

Inits the GUI section of this element.

Reimplemented from mcElementArrayHelpers.

Definition at line 116 of file Polynomial.h.

References mcElementArrayHelpers::gui_Init().

mcInputRes mcPolynomialHelpers::gui_Input const mcKey key,
mcElement pnewelem
[virtual]
 

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.

mcInsertRes mcPolynomialHelpers::gui_Insert const mcElement toinsert,
mcElement
[virtual]
 

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.

bool mcPolynomialHelpers::gui_isArrayEmpty  ) 
 

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().

bool mcPolynomialHelpers::gui_isArrEndKey const mcKey  )  const [inline, virtual]
 

See io_isBeginChar function.

Implements mcElementArrayHelpers.

Definition at line 345 of file Polynomial.h.

bool mcPolynomialHelpers::gui_isBeginKey const mcKey  )  const [inline, virtual]
 

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.

void mcPolynomialHelpers::gui_OnNewParenthesis bool  leftpar  )  [inline]
 

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().

void mcPolynomialHelpers::gui_OnSelect wxDC &  dc,
wxRect &  rc
[inline, virtual]
 

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.

void mcPolynomialHelpers::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...

Definition at line 557 of file Polynomial.cpp.

References mcElementArray::data_AddElements(), mcElement::data_AddProperty(), mcElementHelpers::data_Check(), mcElementArray::data_Delete(), mcElementArrayHelpers::data_Get(), mcElementArray::data_GetArray(), mcElementArrayHelpers::data_GetConst(), mcElementArray::data_GetCount(), mcElementArrayHelpers::data_GetCount(), mcElementArray::data_GetElemOfType(), mcElementArray::data_GetIndexOf(), mcElementHelpers::data_GetType(), mcElementArrayHelpers::data_Merge(), mcElementArray::data_MoveElemLeft(), mcParenthesis::data_SetAsLeftBracket(), mcParenthesis::data_SetAsRightBracket(), mcElementArray::gui_SetCursorOnElemEnd(), mcElement::gui_SetCursorPos(), mcASSERT, mcCP_BEGIN, mcCP_END, mcEmptyElement, mcEmptyMonomial, mcEP_INITIALIZED, mcET_MONOMIAL, mcGUILOG, mcTXT, and mcTXTTHIS.

Referenced by gui_Input().

void mcPolynomialHelpers::gui_SetBracketToReplace const mcBracket p,
bool  leftpar
[inline]
 

Definition at line 365 of file Polynomial.h.

Referenced by gui_BackInput().

void mcPolynomialHelpers::gui_SetCursorPos const mcCursorPos code  )  [virtual]
 

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.

wxString mcPolynomialHelpers::io_GetInlinedExpr  )  const [virtual]
 

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:

  • "^" introduces an exponent
  • "_" introduces a subscript Some examples of inlined expressions are: "4x^2+5a*sin(x/4)", "cos^2(PI/2)+ (123ax+b)/c >= 0", ....

Reimplemented from mcElementArrayHelpers.

Definition at line 1221 of file Polynomial.cpp.

References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), and mcElement::io_GetInlinedExpr().

wxXml2Node mcPolynomialHelpers::io_GetMathML bool  bGetPresentation  )  const [virtual]
 

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).

Parameters:
bGetPresentation TRUE if you want to get the presentation markup, FALSE if you want the content MathML.
Returns:
The XML tree containing the MathML code for this element.

Implements mcElementHelpers.

Definition at line 1183 of file Polynomial.cpp.

References mcElementArrayHelpers::data_Get(), mcElementArrayHelpers::data_GetCount(), and mcElement::io_GetMathML().

bool mcPolynomialHelpers::io_ImportInlinedExpr const wxString &  todecode,
int *  p,
wxString &  pErr
[inline, virtual]
 

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 count parameter which must *absolutely* be set by this function.

Parameters:
str The string containing the inlined expression to import.
count A pointer where is stored the number of characters of str imported by this function.
pErr The string where the error description is placed, if the function returns FALSE.
Returns:
TRUE on success: the first (and eventually the following) characters of the given string represent an encoded inline expression of this element and they were successfully recognized and imported.

Implements mcElementHelpers.

Definition at line 652 of file Polynomial.h.

References mcElement::io_ImportInlinedExpr().

bool mcPolynomialHelpers::io_ImportInlinedExpr const wxString &  todecode,
int *  ,
wxString &  pErr,
int  mlimit
 

Definition at line 1298 of file Polynomial.cpp.

References mcElementArrayHelpers::data_AddElements(), mcElementArrayHelpers::data_AddNewElement(), mcElementArrayHelpers::data_DeleteAll(), mcElementArray::data_DeleteAllElemType(), mcElementArrayHelpers::data_GetElemOfType(), mcElementArrayHelpers::data_GetNumOfElemType(), mcElementArrayHelpers::data_isArrayEmpty(), mcElementArray::data_Repair(), data_ReplaceAllParentheses(), mcElement::io_ImportInlinedExpr(), mcElementHelpers::io_isCharBeginChar(), mcElementHelpers::io_PostProcessChildren(), mcASSERT, mcET_MONOMIAL, mcET_PARENTHESIS, mcIOLOG, and mcTXTTHIS.

bool mcPolynomialHelpers::io_ImportPresentationMathML wxXml2Node  tag,
wxString &  pErr
[virtual]
 

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 pTag.

Parameters:
pTag The wxXML_***_NODE class to parse.
pErr The string where the error description is placed, if the function returns FALSE.
Returns:
TRUE on success (no mismatched or invalid tags).

Implements mcElementHelpers.

Definition at line 1241 of file Polynomial.cpp.

References mcElementArrayHelpers::data_AddElements(), mcElementArrayHelpers::data_DeleteAll(), and mcElement::io_ImportPresentationMathML().

mcBasicOpRes mcPolynomialHelpers::math_Add const mcElement ,
mcElement p,
bool  add
[virtual]
 

Sums or subtracts this element with the given e element.

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 pp pointer to store the replacement element which will be used by the caller in case this function returns mcBOR_REPLACE_OPERAND or mcBOR_REPLACE_BOTH.

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().

bool mcPolynomialHelpers::math_CanBeRaisedTo const mcPolynomial  )  const
 

Definition at line 2023 of file Polynomial.cpp.

References math_GetCount().

Referenced by math_RaiseTo().

void mcPolynomialHelpers::math_ChangeAllSigns  ) 
 

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().

void mcPolynomialHelpers::math_ChangeSign int  n  )  [inline]
 

Changes the sign of the n-th monomial.

Parameters:
n The zero-based math-index of monomial whose sign must be changed.

Definition at line 567 of file Polynomial.h.

Referenced by math_ChangeAllSigns(), and math_HandleExpSimFlag().

mcElementArray mcPolynomialHelpers::math_CreateWrapperFor const mcElement p  )  const [virtual]
 

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.

int mcPolynomialHelpers::math_DataToMathIdx int  dataindex  )  const [virtual]
 

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().

bool mcPolynomialHelpers::math_DeleteFirstOp  ) 
 

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().

void mcPolynomialHelpers::math_DeleteSelection  ) 
 

Definition at line 2000 of file Polynomial.cpp.

References mcElementHelpers::data_Check(), and mcElementArrayHelpers::gui_DeleteSelection().

void mcPolynomialHelpers::math_DistributeBracket int  mdataidx,
int  bridx
[protected]
 

Expands the bracket placed in the "bridx" math entry of the monomial placed in the "mdataidx" entry (expressed in data-coords).

The expansion takes place considering all elements placed before and after the bracket and thus generating a mathematically correct result.

Definition at line 2421 of file Polynomial.cpp.

References mcElementHelpers::data_Check(), mcElement::data_Check(), mcElementArrayHelpers::data_Detach(), mcElementArray::data_Get(), mcElementArrayHelpers::data_Get(), mcExpContainer::data_GetContent(), mcElementArray::data_GetElemIndexOfType(), mcElement::data_GetType(), mcElementHelpers::data_GetType(), mcElementArrayHelpers::data_isAddSubOp(), mcElementArrayHelpers::data_MoveElemLeft(), mcElementArrayHelpers::data_MoveElemRight(), mcElementArrayHelpers::data_Set(), mcPolynomial::math_Get(), mcElementArray::math_Get(), mcElementArray::math_GetCount(), mcPolynomial::math_GetSign(), mcElementArray::math_MathToDataIdx(), mcElementArray::math_ResetToOne(), mcElement::math_SimpleMultiplyBy(), mcASSERT, mcET_ADDOP, mcET_BRACKET, mcET_MONOMIAL, mcET_SUBOP, mcMATHLOG, mcTXT, and mcTXTTHIS.

Referenced by math_HandleExpSimFlag().

mcBasicOpRes mcPolynomialHelpers::math_DivideBy const mcElement ,
mcElement p
[virtual]
 

Divides two mcElements of the same type and stores the result in this object.

Parameters:
p A pointer to a mcElement of the same type of this mcElement, which will be used to divide this mcElement.

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.

mcArrayEntry mcPolynomialHelpers::math_EmbedInBracket int *  n,
int  count
 

Definition at line 2548 of file Polynomial.cpp.

References mcElementArrayHelpers::data_GetCount(), mcArrayEntry::data_GetRef(), mcElement::data_GetType(), mcExpContainer::data_SetContent(), mcElementArrayHelpers::math_EmbedInBracket(), math_Get(), math_GetSign(), mcElementArrayHelpers::math_Remove(), mcElementArrayHelpers::math_SimpleAdd(), mcElement::math_SimpleAdd(), mcASSERT, mcET_BRACKET, and mcMAKEPOL_IDX.

virtual void mcPolynomialHelpers::math_EndExpSteps  )  [inline, protected, virtual]
 

See the topic "Sign management in mcPolynomial".

Reimplemented from mcElementArrayHelpers.

Definition at line 409 of file Polynomial.h.

virtual void mcPolynomialHelpers::math_EndSimSteps  )  [inline, protected, virtual]
 

See the topic "Sign management in mcPolynomial".

Reimplemented from mcElementArrayHelpers.

Definition at line 406 of file Polynomial.h.

void mcPolynomialHelpers::math_FactoreOut const mcSymbolArray arr  ) 
 

Definition at line 2373 of file Polynomial.cpp.

References mcElementArrayHelpers::data_GetCount(), math_FactoreOut(), and mcEmptyPolynomial.

void mcPolynomialHelpers::math_FactoreOut const mcSymbolProperties unk,
const mcPolynomial pol,
bool  bForceUseless
 

Definition at line 2317 of file Polynomial.cpp.

References mcElementHelpers::math_ContainsSymbol(), math_FactoreOut(), math_Get(), and math_GetCount().

void mcPolynomialHelpers::math_FactoreOut int *  n,
int  count,
bool  bForceUseless
 

Definition at line 2278 of file Polynomial.cpp.

References mcElementHelpers::data_Check(), mcArrayEntry::data_GetBracket(), mcExpContainer::data_GetContent(), mcArrayEntry::data_GetRef(), mcElementArrayHelpers::math_EmbedInBracket(), mcPolynomial::math_Get(), mcElementArray::math_GetCount(), math_GetCount(), math_GetGCDFor(), math_GetMonomialContaining(), mcElementArray::math_isWrappingOnly(), mcElement::math_SimpleDivideBy(), mcElement::math_SimpleMultiplyBy(), mcMATHLOG, and mcTXT.

Referenced by math_FactoreOut(), math_FactoreOutConstants(), math_FactoreOutFreeOf(), math_FactoreOutParameters(), and math_FactoreOutUnknowns().

void mcPolynomialHelpers::math_FactoreOutAll bool  bForceUseless  )  [inline]
 

Definition at line 494 of file Polynomial.h.

void mcPolynomialHelpers::math_FactoreOutConstants  ) 
 

Definition at line 2380 of file Polynomial.cpp.

References math_FactoreOut().

void mcPolynomialHelpers::math_FactoreOutFreeOf const mcSymbolProperties unk,
const mcPolynomial pol,
bool  bForceUseless
 

Definition at line 2345 of file Polynomial.cpp.

References mcElementHelpers::math_ContainsSymbol(), math_FactoreOut(), math_Get(), and math_GetCount().

void mcPolynomialHelpers::math_FactoreOutParameters  ) 
 

Definition at line 2386 of file Polynomial.cpp.

References math_FactoreOut().

void mcPolynomialHelpers::math_FactoreOutUnknowns  ) 
 

Definition at line 2383 of file Polynomial.cpp.

References math_FactoreOut().

void mcPolynomialHelpers::math_Factorize int *  n,
int  count
 

Acts so.

Definition at line 2233 of file Polynomial.cpp.

int mcPolynomialHelpers::math_FindMonomialContaining const mcElement elem,
int  occ = 0,
int *  n = NULL
const
 

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.

Parameters:
n If not NULL, in this pointer is stored the

Definition at line 1633 of file Polynomial.cpp.

References math_Get(), math_GetCount(), and mcElementArray::math_GetIndexOf().

Referenced by math_GetMonomialContaining().

mcMonomial& mcPolynomialHelpers::math_Get int  n  )  [inline]
 

Reimplemented from mcElementArrayHelpers.

Definition at line 433 of file Polynomial.h.

References mcET_MONOMIAL.

const mcMonomial& mcPolynomialHelpers::math_Get int  n  )  const [inline]
 

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().

mcMonomial mcPolynomialHelpers::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.

Definition at line 1731 of file Polynomial.cpp.

References math_GetCoeffOf(), and mcElementArray::math_WrapNumber().

mcMonomial mcPolynomialHelpers::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.

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.

mcMonomial mcPolynomialHelpers::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.

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().

virtual int mcPolynomialHelpers::math_GetCount  )  const [inline, virtual]
 

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).

Note:
This is a fastest implementation of the general one given by mcElementArray::math_GetCount()

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().

mcMonomial mcPolynomialHelpers::math_GetGCD const mcElement p  )  const [virtual]
 

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().

mcMonomial mcPolynomialHelpers::math_GetGCDFor int *  n,
int  count
const
 

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().

int mcPolynomialHelpers::math_GetIdxFromEntry const mcArrayEntry p  )  const [inline]
 

Definition at line 147 of file Polynomial.h.

mcArrayEntry mcPolynomialHelpers::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.

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.

mcMonomial mcPolynomialHelpers::math_GetLCM const mcElement p  )  const [virtual]
 

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().

mcIntegerValue mcPolynomialHelpers::math_GetMaxDegreeFor const mcSymbolProperties  )  const
 

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.

const mcMonomial & mcPolynomialHelpers::math_GetMonomialContaining const mcElement elem,
int  occ = 0,
int *  n = NULL
const
 

Returns the monomial containing the occ-th occurrence of the given element.

If not NULL, stores in n the math-index of that element in the returned monomial.

Definition at line 1653 of file Polynomial.cpp.

References math_FindMonomialContaining(), math_Get(), and mcEmptyMonomial.

Referenced by math_FactoreOut(), and math_GetCoeffOf().

int mcPolynomialHelpers::math_GetMonomialIdxFromEntry const mcArrayEntry p  )  const [inline]
 

Definition at line 149 of file Polynomial.h.

mcElementType mcPolynomialHelpers::math_GetNeutralOpType  )  const [inline, virtual]
 

Implements mcElementArrayHelpers.

Definition at line 531 of file Polynomial.h.

References mcET_ADDOP.

Referenced by math_DeleteFirstOp().

double mcPolynomialHelpers::math_GetNeutralValue  )  const [inline, virtual]
 

Implements mcElementArrayHelpers.

Definition at line 532 of file Polynomial.h.

const mcNumber & mcPolynomialHelpers::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.

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().

virtual int mcPolynomialHelpers::math_GetOrderPos  )  const [inline, virtual]
 

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.

mcPolynomial mcPolynomialHelpers::math_GetPolynomialWrapper  )  const [virtual]
 

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().

mcMonomial& mcPolynomialHelpers::math_GetSel int  n  )  [inline]
 

Definition at line 601 of file Polynomial.h.

References mcET_MONOMIAL.

const mcMonomial& mcPolynomialHelpers::math_GetSel int  n  )  const [inline]
 

Definition at line 598 of file Polynomial.h.

References mcET_MONOMIAL.

Referenced by mcMathMngHelpers::gui_AddSubSel(), and mcMathMngHelpers::gui_MoveSel().

int mcPolynomialHelpers::math_GetSelCount  )  const [inline]
 

Definition at line 592 of file Polynomial.h.

References mcET_MONOMIAL.

Referenced by mcMathMngHelpers::gui_AddSubSel(), and mcMathMngHelpers::gui_MoveSel().

int mcPolynomialHelpers::math_GetSelIndex int  n  )  const [inline]
 

Definition at line 595 of file Polynomial.h.

References mcET_MONOMIAL.

int mcPolynomialHelpers::math_GetSign int  n  )  const
 

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().

const mcElement & mcPolynomialHelpers::math_GetWrapped mcElementType  t  )  const [virtual]
 

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.

Reimplemented from mcElementArrayHelpers.

Definition at line 214 of file Polynomial.cpp.

References mcElementHelpers::data_GetType(), math_Get(), mcElementArray::math_GetWrapped(), math_isWrappingOnly(), and mcEmptyElement.

mcExpSimRes mcPolynomialHelpers::math_HandleExpSimFlag mcExpSimRes  r,
mcElement pnew,
int  i
[virtual]
 

Handles the given simplification flag returned by the i-th element of this array.

Note:
Unlike almost all math functions, the given index i must be in DATA coord and not in MATH coordinates...
Returns:
The index of the next element to simplify (used by caller if simplifying the element in a cycle).

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.

bool mcPolynomialHelpers::math_isFactorized  )  const [inline]
 

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().

bool mcPolynomialHelpers::math_isFirstMonomialNegative  )  const [inline]
 

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.

bool mcPolynomialHelpers::math_isWrappingOnly mcElementType  t  )  const [virtual]
 

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().

int mcPolynomialHelpers::math_MathToDataIdx int  mathindex  )  const [virtual]
 

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().

mcBasicOpRes mcPolynomialHelpers::math_MultiplyBy const mcElement ,
mcElement p
[virtual]
 

Multiplies two mcElements of the same type and stores the result in this object.

Parameters:
p A pointer to a mcElement of the same type of this mcElement, which will be multiplied with this mcElement.

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.

void mcPolynomialHelpers::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.

Definition at line 1611 of file Polynomial.cpp.

References mcMonomial::math_GetCoeff(), math_GetNumSign(), mcElement::math_SimpleMultiplyBy(), mcASSERT, and mcEmptyElement.

Referenced by math_GetCoeffOf().

mcIntegerValue mcPolynomialHelpers::math_RaiseGetCoeff int *  indexes,
int  m
 

Definition at line 2007 of file Polynomial.cpp.

References mcIntegerValue::GetComb().

Referenced by math_RaiseTo().

mcBasicOpRes mcPolynomialHelpers::math_RaiseTo const mcPolynomial  )  [virtual]
 

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.

Note:
All MathCore elements must implement this function, not only mcExpElement-derived classes because this operation *must* be feasible on every element: those elements which do not hold an exponent, must raise their children directly. mcFraction, for example, must implement this operation directly raising the numerator & denominator.

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.

void mcPolynomialHelpers::math_RaiseTo const mcRealValue n  ) 
 

Definition at line 2044 of file Polynomial.cpp.

References mcElement::chlp(), data_DeepCopy(), mcValue::GetInt(), mcIntegerValue::GetStr(), mcElementArrayHelpers::math_EmbedInBracketAndRaiseTo(), math_Get(), mcElementArray::math_GetCount(), math_GetCount(), math_GetSign(), mcElement::math_MultiplyBy(), math_RaiseGetCoeff(), mcElement::math_RaiseTo(), mcElement::math_SimpleAdd(), mcElementArray::math_WrapNumber(), mcMATHLOG, mcTXTTHIS, and mcTXTV.

Referenced by math_RaiseTo().

mcExpSimRes mcPolynomialHelpers::math_Reorder  )  [protected, virtual]
 

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.

void mcPolynomialHelpers::math_SetSign int  n,
int  sgn
 

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().

mcExpSimRes mcPolynomialHelpers::math_Simplify long  flags  )  [inline]
 

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().

mcExpSimRes mcPolynomialHelpers::math_Simplify long  flags,
mcElement newelem
[virtual]
 

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

Returns:
Returns TRUE if the element is completely simplied and thus, the following calls to math_Simplify won't have effect.

Reimplemented from mcElementArrayHelpers.

Definition at line 1838 of file Polynomial.cpp.

References math_DeleteFirstOp(), mcElementArrayHelpers::math_Simplify(), mcESR_DONE, and mcLOG.

mcExpSimRes mcPolynomialHelpers::math_SimplifySolveOp long  flags  )  [protected, virtual]
 

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.

mcBasicOpRes mcPolynomialHelpers::math_Subtract const mcElement ,
mcElement p
 

math_s two mcElements of the same type and stores the result in this object.

Reimplemented from mcElementHelpers.

void mcPolynomialHelpers::math_SyncCoeffWithSigns  ) 
 

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.

mcArrayEntry mcPolynomialHelpers::math_WrapMonomial const mcMonomial  )  [virtual]
 

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().

mcArrayEntry mcPolynomialHelpers::math_WrapSimple const mcElement  )  [virtual]
 

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.

mcPolynomialHelpers::mcDEFINE_REFERENCE_DATA mcPolynomial  ,
mcET_POLYNOMIAL 
[private]
 


Member Data Documentation

bool mcPolynomialHelpers::mgui_bMoveCursorAtBracketBegin
 

Definition at line 88 of file Polynomial.h.

Referenced by data_DeepCopy(), and gui_Input().

bool mcPolynomialHelpers::mgui_bRemoveLeftParenthesis
 

Definition at line 91 of file Polynomial.h.

Referenced by data_DeepCopy(), and gui_Input().

bool mcPolynomialHelpers::mgui_bRemoveParenthesis
 

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().

mcElement mcPolynomialHelpers::mgui_pBracketToReplace
 

Definition at line 90 of file Polynomial.h.

Referenced by gui_Input().

int mcPolynomialHelpers::sgui_nSpaceBetween = 2 [static]
 

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.

mcPolynomial * mcPolynomialHelpers::smath_pEmpty = NULL [static]
 

An empty mcPolynomial.

Definition at line 69 of file Polynomial.cpp.

mcPolynomial * mcPolynomialHelpers::smath_pOne = NULL [static]
 

A mcPolynomial containing a mcNumber with "1.0" as content...

Definition at line 68 of file Polynomial.cpp.


The documentation for this class was generated from the following files:

Documentation generated with Doxygen on Sun Feb 6 17:13:05 2005
Visit MathStudio home page for more info

[ Top ]