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

mcIntegerValue Class Reference

#include <Value.h>

Inheritance diagram for mcIntegerValue:

Inheritance graph
[legend]
Collaboration diagram for mcIntegerValue:

Collaboration graph
[legend]
List of all members.

Detailed Description

An integer value positive or negative.

Definition at line 509 of file Value.h.

Public Member Functions

 mcVALUE_DEFINE_CONSTRUCTORS (mcIntegerValue, mcMPZ)
 mcIntegerValue (const mcRationalValue &m)
 mcIntegerValue (const mcRealValue &m)
 mcVALUE_DEFINE_GETSET (mcIntegerValue, mpz)
 mcVALUE_DEFINE_ALLOPERATORS (mcIntegerValue, mcMPZ, mpz)
mcIntegerValue abs () const
 Returns the absolute value of this number.
mcIntegerValue pow (unsigned long int exp) const
 Raise this number to the given one.
mcIntegerValue GetMax (const mcIntegerValue &n) const
mcIntegerValue GetMin (const mcIntegerValue &n) const
wxString GetStr () const
 See mcValue::GetStr.
bool isInteger () const
 mcIntegerValues are always integer... :-)
bool isPrimeTo (const mcIntegerValue &n) const
 Returns TRUE if this number and the given one are prime.
mcIntegerValue GCD (const mcIntegerValue &n) const
 Returns the highest common factor between the two numbers supplied.
mcIntegerValue LCM (const mcIntegerValue &n) const
 Returns the least common multiple between the two numbers supplied.

Static Public Member Functions

static mcIntegerValue GetComb (const mcIntegerValue &n1, const mcIntegerValue &n2)

Static Public Attributes

static mcIntegerValuepOne = NULL
static mcIntegerValuepZero = NULL
static mcIntegerValuepNAN = NULL
 Not a number. See isNAN().
static mcIntegerValuepPosInf = NULL
 Positive infinite. See math_isFinite().
static mcIntegerValuepNegInf = NULL
 Negative infinite. See math_isFinite().

Private Member Functions

 mcVALUE_DEFINE_COW (mcMPZ, mpz)


Constructor & Destructor Documentation

mcIntegerValue::mcIntegerValue const mcRationalValue m  ) 
 

Definition at line 145 of file Value.cpp.

mcIntegerValue::mcIntegerValue const mcRealValue m  ) 
 

Definition at line 148 of file Value.cpp.


Member Function Documentation

mcIntegerValue mcIntegerValue::abs  )  const [inline]
 

Returns the absolute value of this number.

Definition at line 533 of file Value.h.

mcIntegerValue mcIntegerValue::GCD const mcIntegerValue n  )  const [inline]
 

Returns the highest common factor between the two numbers supplied.

If we have two integers, GCD is the largest integer that divides evenly both numbers Euclid's GCD Algorithm is as follows -

GCD(0, 0) = 1 GCD(x, 0) = x GCD(x, y) = GCD(y, x mod y)

Definition at line 566 of file Value.h.

Referenced by isPrimeTo(), and mcNumberHelpers::math_CanBeDivBy().

static mcIntegerValue mcIntegerValue::GetComb const mcIntegerValue n1,
const mcIntegerValue n2
[inline, static]
 

Definition at line 555 of file Value.h.

References mcValue::GetLong().

Referenced by mcPolynomialHelpers::math_RaiseGetCoeff().

mcIntegerValue mcIntegerValue::GetMax const mcIntegerValue n  )  const [inline]
 

Definition at line 540 of file Value.h.

Referenced by mcPolynomialHelpers::math_GetMaxDegreeFor(), and mcMonomialHelpers::math_GetMaxDegreeFor().

mcIntegerValue mcIntegerValue::GetMin const mcIntegerValue n  )  const [inline]
 

Definition at line 543 of file Value.h.

wxString mcIntegerValue::GetStr  )  const [virtual]
 

See mcValue::GetStr.

Implements mcValue.

Definition at line 151 of file Value.cpp.

References GMP2WX.

Referenced by mcNumberHelpers::math_CanBeDivBy(), mcMonomialHelpers::math_GetMaxDegreeFor(), and mcPolynomialHelpers::math_RaiseTo().

bool mcIntegerValue::isInteger  )  const [inline, virtual]
 

mcIntegerValues are always integer... :-)

Implements mcValue.

Definition at line 550 of file Value.h.

bool mcIntegerValue::isPrimeTo const mcIntegerValue n  )  const [inline]
 

Returns TRUE if this number and the given one are prime.

Definition at line 553 of file Value.h.

References GCD().

Referenced by mcNumberHelpers::math_CanBeDivBy().

mcIntegerValue mcIntegerValue::LCM const mcIntegerValue n  )  const [inline]
 

Returns the least common multiple between the two numbers supplied.

If we have two numbers, LCM is the smallest integer that both of them divide evenly into. LCM Algorithm is as follows -

LCM(x, y)

Definition at line 575 of file Value.h.

mcIntegerValue::mcVALUE_DEFINE_ALLOPERATORS mcIntegerValue  ,
mcMPZ  ,
mpz 
 

mcIntegerValue::mcVALUE_DEFINE_CONSTRUCTORS mcIntegerValue  ,
mcMPZ 
 

mcIntegerValue::mcVALUE_DEFINE_COW mcMPZ  ,
mpz 
[private]
 

mcIntegerValue::mcVALUE_DEFINE_GETSET mcIntegerValue  ,
mpz 
 

mcIntegerValue mcIntegerValue::pow unsigned long int  exp  )  const [inline]
 

Raise this number to the given one.

Definition at line 537 of file Value.h.


Member Data Documentation

mcIntegerValue * mcIntegerValue::pNAN = NULL [static]
 

Not a number. See isNAN().

Definition at line 57 of file Value.cpp.

mcIntegerValue * mcIntegerValue::pNegInf = NULL [static]
 

Negative infinite. See math_isFinite().

Definition at line 59 of file Value.cpp.

mcIntegerValue * mcIntegerValue::pOne = NULL [static]
 

Definition at line 55 of file Value.cpp.

mcIntegerValue * mcIntegerValue::pPosInf = NULL [static]
 

Positive infinite. See math_isFinite().

Definition at line 58 of file Value.cpp.

mcIntegerValue * mcIntegerValue::pZero = NULL [static]
 

Definition at line 56 of file Value.cpp.


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

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

[ Top ]