#include <Value.h>
Inheritance diagram for mcValue:
This class links MathCore, wxWidgets and mpf_t libraries !!!
Definition at line 423 of file Value.h.
Public Member Functions | |
mcValue () | |
virtual | ~mcValue () |
virtual void | SetInt (int n) |
virtual void | SetLong (long n)=0 |
virtual void | SetStr (const wxString &str, int base=10)=0 |
virtual long | GetLong () const =0 |
virtual int | GetInt () const |
operator int () const | |
operator long () const | |
operator unsigned long () | |
virtual wxString | GetStr () const =0 |
Returns a string in exponential form, thus containing something like:. | |
bool | isValid () const |
Returns TRUE if the given double is a "normal" number: not an infinite, not an 1.#INF and not a NaN... | |
bool | isNAN () const |
Returns TRUE if this number is not mcValue::pNAN. | |
bool | math_isFinite () const |
Returns TRUE if this number is not mcValue::pNegInf or mcValue::pPosInf. | |
bool | isPosInf () const |
bool | isNegInf () const |
virtual bool | isInteger () const =0 |
Returns TRUE if the given real number does not have decimal digits (that is, it can be converted to a mcIntegerValue without rounding). | |
virtual int | GetFlags () const =0 |
Returns the flags of this number. | |
virtual void | SetFlags (int n)=0 |
Sets the flags of this number. | |
void | math_AddFlag (int n) |
math_Adds a flag to this number. | |
Static Public Member Functions | |
static void | Init () |
Initializes the static variables used by mcValue. | |
static void | Cleanup () |
Undoes what Init() does: destroys static variables. | |
Static Public Attributes | |
static int | m_nMaxValueSharing = -1 |
The maximum number of mcValue-derived classes which shared the same GMP structure contemporary. |
|
|
|
|
|
Undoes what Init() does: destroys static variables. After this function you cannot use mcValue anymore, unless you call Init() another time... Definition at line 121 of file Value.cpp. Referenced by mcMathCore::CleanupMath(). |
|
Returns the flags of this number. See the mcVALUE_XXX_FLAG defines above. Referenced by isNAN(), isNegInf(), isPosInf(), and math_AddFlag(). |
|
Definition at line 453 of file Value.h. References GetLong(). Referenced by mcMonomialHelpers::math_GetOrderPos(), mcPolynomialHelpers::math_RaiseTo(), mcPolySolver::math_SolveLine(), and operator int(). |
|
Implemented in mcRationalValue. Referenced by mcIntegerValue::GetComb(), GetInt(), operator long(), and operator unsigned long(). |
|
Returns a string in exponential form, thus containing something like:. SnnnE+yyyy example: -4318384739357974916E+6215 or SnnnE-yyyy example: +8.208237913789131096523645193E-12873 where:
Implemented in mcIntegerValue, mcRationalValue, and mcRealValue. |
|
Initializes the static variables used by mcValue. This function must be called *before* using any other mcValue function. Definition at line 97 of file Value.cpp. References math_AddFlag(), mcGMPAlloc(), mcGMPFree(), mcGMPRealloc(), mcVALUE_NAN_FLAG, mcVALUE_NEGINF_FLAG, and mcVALUE_POSINF_FLAG. Referenced by mcMathCore::SetupMath(). |
|
Returns TRUE if the given real number does not have decimal digits (that is, it can be converted to a mcIntegerValue without rounding).
Implemented in mcIntegerValue, mcRationalValue, and mcRealValue. |
|
Returns TRUE if this number is not mcValue::pNAN.
Definition at line 483 of file Value.h. References GetFlags(), and mcVALUE_NAN_FLAG. Referenced by isValid(), mcExpElementHelpers::math_Evaluate(), and mcElementArrayHelpers::math_Evaluate(). |
|
Definition at line 489 of file Value.h. References GetFlags(), and mcVALUE_NEGINF_FLAG. Referenced by math_isFinite(). |
|
Definition at line 488 of file Value.h. References GetFlags(), and mcVALUE_POSINF_FLAG. Referenced by math_isFinite(). |
|
Returns TRUE if the given double is a "normal" number: not an infinite, not an 1.#INF and not a NaN...
Definition at line 480 of file Value.h. References isNAN(), and math_isFinite(). Referenced by mcFractionHelpers::math_Evaluate(), mcElementArrayHelpers::math_Evaluate(), mcFunctionHelpers::math_EvaluateBase(), mcPolynomialHelpers::math_GetMaxDegreeFor(), mcMonomialHelpers::math_GetMaxDegreeFor(), mcMathMngHelpers::math_GetMaxDegreeFor(), mcNumberHelpers::math_isValid(), mcNumberHelpers::math_MultiplyBaseBy(), and mcPolySolver::math_SolveLine(). |
|
math_Adds a flag to this number. See the mcVALUE_XXX_FLAG defines above. Definition at line 505 of file Value.h. References GetFlags(), and SetFlags(). Referenced by Init(). |
|
Returns TRUE if this number is not mcValue::pNegInf or mcValue::pPosInf.
Definition at line 486 of file Value.h. References isNegInf(), and isPosInf(). Referenced by isValid(), and mcElementHelpers::math_isFinite(). |
|
Definition at line 455 of file Value.h. References GetInt(). |
|
Definition at line 456 of file Value.h. References GetLong(). |
|
Definition at line 458 of file Value.h. References GetLong(). |
|
Sets the flags of this number. See the mcVALUE_XXX_FLAG defines above. Referenced by math_AddFlag(). |
|
Definition at line 448 of file Value.h. References SetLong(). |
|
Implemented in mcRationalValue. Referenced by SetInt(). |
|
Implemented in mcRationalValue. |
|
The maximum number of mcValue-derived classes which shared the same GMP structure contemporary.
|
[ Top ] |