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

mcPolynomial Class Reference

#include <Polynomial.h>

Inheritance diagram for mcPolynomial:

Inheritance graph
[legend]
Collaboration diagram for mcPolynomial:

Collaboration graph
[legend]
List of all members.

Detailed Description

A little class containing the DATA, MATH, GUI and IO sections of this element (as instances and not pointers).

This is entirely defined & implemented through macros.

Definition at line 663 of file Polynomial.h.

Public Member Functions

 mcPolynomial (const mcMonomial &towrap)
 mcPolynomial (const mcSymbol &towrap)
 mcPolynomial (const mcNumber &towrap)
 mcPolynomial (const mcSymbolProperties *towrap)
 mcPolynomial (const mcRealValue &towrap)
 mcPolynomial (const mcRadical &towrap)
 mcPolynomial (const mcBracket &towrap)
 mcPolynomial (const mcFraction &towrap)
mcPolynomialoperator- ()
bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
mcWRAPPER bool data_CreateFirstOp ()
mcWRAPPER void data_DeleteFirstOp ()
mcWRAPPER int data_AddNewMonomialContaining (mcElement *contents, int n=1, int pos=-1, bool bOverwrite=FALSE)
mcWRAPPER int data_AddNewMonomialContaining (mcElement &monomialinit, int pos=-1, bool bOverwrite=TRUE)
mcWRAPPER int data_AddNewMonomial (const mcMonomial &toinsert, int pos=-1, bool bOverwrite=FALSE)
mcWRAPPER int data_AddNewEmptyMonomial (int pos=-1)
mcWRAPPER void gui_AddNewEmptyMonomial (int pos=-1)
mcWRAPPER int gui_ExDraw (wxDC &dc, int x, int y, long flags, const wxPoint &pt, int cl) const
mcWRAPPER const mcMonomialmath_Get (int n) const
mcWRAPPER mcMonomialmath_Get (int n)
mcWRAPPER int math_FindMonomialContaining (const mcElement &elem, int occ=0, int *n=NULL) const
mcWRAPPER const mcMonomialmath_GetMonomialContaining (const mcElement &elem, int occ=0, int *n=NULL) const
mcWRAPPER mcMonomial math_GetCoeffOf (int mathidx, const mcElement *toremove, int ntoremove) const
mcWRAPPER mcMonomial math_GetCoeffOf (const mcSymbolProperties *sym, const mcPolynomial &exp, int occ=0) const
mcWRAPPER mcMonomial math_GetCoeffOf (const mcSymbolProperties *sym, const mcRealValue &exp, int occ=0) const
mcWRAPPER bool math_isFactorized () const
mcWRAPPER bool math_isFirstMonomialNegative () const
mcWRAPPER mcMonomial math_GetFactors () const
mcWRAPPER void math_Factorize (int *n, int count)
mcWRAPPER void math_FactoreOut (int *n, int count, bool bForceUseless)
mcWRAPPER void math_FactoreOutAll (bool bForceUseless)
mcWRAPPER void math_FactoreOut (const mcSymbolProperties *unk, const mcPolynomial &pol, bool bForceUseless)
mcWRAPPER void math_FactoreOutFreeOf (const mcSymbolProperties *unk, const mcPolynomial &pol, bool bForceUseless)
mcWRAPPER void math_FactoreOut (const mcSymbolArray *arr)
mcWRAPPER void math_FactoreOutUnknowns ()
mcWRAPPER void math_FactoreOutParameters ()
mcWRAPPER void math_FactoreOutConstants ()
mcWRAPPER mcIntegerValue math_GetMaxDegreeFor (const mcSymbolProperties *s) const
mcWRAPPER int math_GetSign (int n) const
mcWRAPPER const mcNumbermath_GetNumSign (const mcMonomial &m, int occ=0) const
mcWRAPPER void math_SetSign (int n, int sgn)
mcWRAPPER void math_ChangeSign (int n)
mcWRAPPER void math_ChangeAllSigns ()
mcWRAPPER void math_PackSign (mcMonomial &m, int occ=0) const
mcWRAPPER bool math_DeleteFirstOp ()
mcWRAPPER bool math_CanBeRaisedTo (const mcPolynomial &n)
mcWRAPPER mcArrayEntry math_GetIndexOf (int occ, const mcMonomial &tofind, bool b) const
mcWRAPPER int math_GetMonomialIdxFromEntry (const mcArrayEntry &p) const
mcWRAPPER int math_GetIdxFromEntry (const mcArrayEntry &p) const

Private Member Functions

 mcDEFINE_MAIN_CLASS (Polynomial, mcElementArray)


Constructor & Destructor Documentation

mcPolynomial::mcPolynomial const mcMonomial towrap  )  [inline]
 

Definition at line 670 of file Polynomial.h.

References mcElementArray::data_AddElements(), and mcObject::data_SetRefData().

mcPolynomial::mcPolynomial const mcSymbol towrap  )  [inline]
 

Definition at line 674 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcObject::data_SetRefData().

mcPolynomial::mcPolynomial const mcNumber towrap  )  [inline]
 

Definition at line 676 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcObject::data_SetRefData().

mcPolynomial::mcPolynomial const mcSymbolProperties towrap  )  [inline]
 

Definition at line 678 of file Polynomial.h.

References mcObject::data_SetRefData(), and mcElementArray::math_WrapSymbol().

mcPolynomial::mcPolynomial const mcRealValue towrap  )  [inline]
 

Definition at line 680 of file Polynomial.h.

References mcObject::data_SetRefData(), and mcElementArray::math_WrapNumber().

mcPolynomial::mcPolynomial const mcRadical towrap  )  [inline]
 

Definition at line 683 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcObject::data_SetRefData().

mcPolynomial::mcPolynomial const mcBracket towrap  )  [inline]
 

Definition at line 685 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcObject::data_SetRefData().

mcPolynomial::mcPolynomial const mcFraction towrap  )  [inline]
 

Definition at line 687 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcObject::data_SetRefData().


Member Function Documentation

mcWRAPPER int mcPolynomial::data_AddNewEmptyMonomial int  pos = -1  )  [inline]
 

Definition at line 719 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::data_ReplaceParentheses().

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

Definition at line 715 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMonomialHelpers::data_TransformDivOp(), and mcFractionHelpers::math_Add().

mcWRAPPER int mcPolynomial::data_AddNewMonomialContaining mcElement monomialinit,
int  pos = -1,
bool  bOverwrite = TRUE
[inline]
 

Definition at line 711 of file Polynomial.h.

References data_AddNewMonomialContaining(), and mcWRAPPER.

mcWRAPPER int mcPolynomial::data_AddNewMonomialContaining mcElement contents,
int  n = 1,
int  pos = -1,
bool  bOverwrite = FALSE
[inline]
 

Definition at line 707 of file Polynomial.h.

References mcWRAPPER.

Referenced by data_AddNewMonomialContaining(), mcPolynomialHelpers::data_ReplaceParentheses(), mcMonomialHelpers::data_TransformDivOp(), and mcPolynomial().

mcWRAPPER bool mcPolynomial::data_CreateFirstOp  )  [inline]
 

Definition at line 702 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::data_DeleteFirstOp  )  [inline]
 

Definition at line 704 of file Polynomial.h.

References mcWRAPPER.

bool mcPolynomial::data_isValidContainerFor mcElementType  t  )  const [inline, virtual]
 

Returns TRUE if this element can safely contain the given element type.

Without this function a lot of errors could be undetectable:

        mcPolynomial pol; // creates a new polynomial
        mcElement e(pol); // references it
        [...]    // the programmers forgots what "e" references
        mcFraction f(e);  // mcFraction wraps a mcPolynomialHelpers class !
        f.data_GetNum();  // CRASH

This function must be overridden by mcElement-derived classes in order to provide a list of the mcElementType it can safely contain.

Reimplemented from mcElementArray.

Definition at line 699 of file Polynomial.h.

References mcET_POLYNOMIAL.

mcWRAPPER void mcPolynomial::gui_AddNewEmptyMonomial int  pos = -1  )  [inline]
 

Definition at line 732 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathOrSystemHelpers::gui_AddEmptyLineToLastAndSystem(), mcMathOrSystemHelpers::gui_AddEmptyLineToNewAndSystem(), mcExpContainerHelpers::gui_BaseInput(), mcExpElementHelpers::gui_CheckExpSub(), mcFunctionHelpers::gui_CheckSub(), mcMathMngHelpers::gui_DeleteSelection(), mcFractionHelpers::gui_DeleteSelection(), mcMathMngHelpers::gui_Input(), mcFractionHelpers::gui_Input(), and mcFunctionHelpers::gui_Setup().

mcWRAPPER int mcPolynomial::gui_ExDraw wxDC &  dc,
int  x,
int  y,
long  flags,
const wxPoint &  pt,
int  cl
const [inline]
 

Definition at line 735 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathMngHelpers::gui_Draw().

mcWRAPPER bool mcPolynomial::math_CanBeRaisedTo const mcPolynomial n  )  [inline]
 

Definition at line 842 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_ChangeAllSigns  )  [inline]
 

Definition at line 835 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::math_Add(), mcExpElementHelpers::math_MakeReciprocal(), mcFractionHelpers::math_Simplify(), mcPolySolver::math_SolveLineSecondDegree(), and operator-().

mcWRAPPER void mcPolynomial::math_ChangeSign int  n  )  [inline]
 

Definition at line 833 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER bool mcPolynomial::math_DeleteFirstOp  )  [inline]
 

Definition at line 839 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_FactoreOut const mcSymbolArray arr  )  [inline]
 

Definition at line 812 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_FactoreOut const mcSymbolProperties unk,
const mcPolynomial pol,
bool  bForceUseless
[inline]
 

Definition at line 807 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_FactoreOut int *  n,
int  count,
bool  bForceUseless
[inline]
 

Definition at line 801 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathMng::math_FactoreOut(), and mcMathMngHelpers::math_FactoreOut().

mcWRAPPER void mcPolynomial::math_FactoreOutAll bool  bForceUseless  )  [inline]
 

Definition at line 803 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathMng::math_FactoreOutAll(), and mcMathMngHelpers::math_FactoreOutAll().

mcWRAPPER void mcPolynomial::math_FactoreOutConstants  )  [inline]
 

Definition at line 818 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_FactoreOutFreeOf const mcSymbolProperties unk,
const mcPolynomial pol,
bool  bForceUseless
[inline]
 

Definition at line 809 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathMng::math_FactoreOutFreeOf(), and mcMathMngHelpers::math_FactoreOutFreeOf().

mcWRAPPER void mcPolynomial::math_FactoreOutParameters  )  [inline]
 

Definition at line 816 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_FactoreOutUnknowns  )  [inline]
 

Definition at line 814 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_Factorize int *  n,
int  count
[inline]
 

Definition at line 799 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER int mcPolynomial::math_FindMonomialContaining const mcElement elem,
int  occ = 0,
int *  n = NULL
const [inline]
 

Definition at line 780 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER mcMonomial& mcPolynomial::math_Get int  n  )  [inline]
 

Reimplemented from mcElementArray.

Definition at line 776 of file Polynomial.h.

References mcElementArray::math_Get(), and mcWRAPPER.

mcWRAPPER const mcMonomial& mcPolynomial::math_Get int  n  )  const [inline]
 

Reimplemented from mcElementArray.

Definition at line 774 of file Polynomial.h.

References mcElementArray::math_Get(), and mcWRAPPER.

Referenced by mcPolynomialHelpers::math_DistributeBracket(), mcPolynomialHelpers::math_FactoreOut(), mcPolynomialHelpers::math_GetGCD(), mcPolynomialHelpers::math_GetLCM(), mcPolynomialHelpers::math_MultiplyBy(), mcRadicalHelpers::math_SimplifyContents(), mcBracketHelpers::math_SimplifyContents(), and mcFractionHelpers::math_SimplifyFactors().

mcWRAPPER mcMonomial mcPolynomial::math_GetCoeffOf const mcSymbolProperties sym,
const mcRealValue exp,
int  occ = 0
const [inline]
 

Definition at line 788 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER mcMonomial mcPolynomial::math_GetCoeffOf const mcSymbolProperties sym,
const mcPolynomial exp,
int  occ = 0
const [inline]
 

Definition at line 786 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER mcMonomial mcPolynomial::math_GetCoeffOf int  mathidx,
const mcElement toremove,
int  ntoremove
const [inline]
 

Definition at line 784 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER mcMonomial mcPolynomial::math_GetFactors  )  const [inline]
 

Reimplemented from mcElement.

Definition at line 796 of file Polynomial.h.

References mcElement::math_GetFactors(), and mcWRAPPER.

Referenced by mcExpContainerHelpers::math_GetFactors().

mcWRAPPER int mcPolynomial::math_GetIdxFromEntry const mcArrayEntry p  )  const [inline]
 

Definition at line 850 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER mcArrayEntry mcPolynomial::math_GetIndexOf int  occ,
const mcMonomial tofind,
bool  b
const [inline]
 

Definition at line 845 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolySolver::math_SolveLineSecondDegree().

mcWRAPPER mcIntegerValue mcPolynomial::math_GetMaxDegreeFor const mcSymbolProperties s  )  const [inline]
 

Definition at line 822 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcMathMngHelpers::math_GetMaxDegreeFor().

mcWRAPPER const mcMonomial& mcPolynomial::math_GetMonomialContaining const mcElement elem,
int  occ = 0,
int *  n = NULL
const [inline]
 

Definition at line 782 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER int mcPolynomial::math_GetMonomialIdxFromEntry const mcArrayEntry p  )  const [inline]
 

Definition at line 848 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolySolver::math_SolveLineSecondDegree().

mcWRAPPER const mcNumber& mcPolynomial::math_GetNumSign const mcMonomial m,
int  occ = 0
const [inline]
 

Definition at line 828 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER int mcPolynomial::math_GetSign int  n  )  const [inline]
 

Definition at line 826 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::math_DistributeBracket().

mcWRAPPER bool mcPolynomial::math_isFactorized  )  const [inline]
 

Definition at line 792 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::math_GetGCD(), mcPolynomialHelpers::math_GetLCM(), mcMathMngHelpers::math_isFactorized(), mcFractionHelpers::math_Simplify(), and mcBracketHelpers::math_SimplifyContents().

mcWRAPPER bool mcPolynomial::math_isFirstMonomialNegative  )  const [inline]
 

Definition at line 794 of file Polynomial.h.

References mcWRAPPER.

Referenced by mcFractionHelpers::math_Simplify().

mcWRAPPER void mcPolynomial::math_PackSign mcMonomial m,
int  occ = 0
const [inline]
 

Definition at line 837 of file Polynomial.h.

References mcWRAPPER.

mcWRAPPER void mcPolynomial::math_SetSign int  n,
int  sgn
[inline]
 

Definition at line 831 of file Polynomial.h.

References mcWRAPPER.

mcPolynomial::mcDEFINE_MAIN_CLASS Polynomial  ,
mcElementArray 
[private]
 

mcPolynomial& mcPolynomial::operator-  )  [inline]
 

Definition at line 692 of file Polynomial.h.

References math_ChangeAllSigns().


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

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

[ Top ]