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

mcRange Class Reference

#include <Range.h>

Inheritance diagram for mcRange:

Inheritance graph
[legend]
Collaboration diagram for mcRange:

Collaboration graph
[legend]
List of all members.

Detailed Description

A mathematical range where something (for example a parameter or an unknown) can vary.

Definition at line 47 of file Range.h.

Public Member Functions

 mcRange (const mcRealValue &l=*mcIntegerValue::pZero, const mcRealValue &u=*mcIntegerValue::pOne, mcSet s=mcSET_R, mcBoundaryMode m=mcBM_INCLUDE_BOTH)
 Builds this range object with polynomials containing only the given values.
 mcRange (const mcPolynomial &l, const mcPolynomial &u, mcSet s=mcSET_R, mcBoundaryMode m=mcBM_INCLUDE_BOTH)
 Builds this range object copying the given upper & lower limits.
virtual ~mcRange ()
mcRangedata_Clone () const
 Returns a clone of this class.
void math_Order ()
 Swaps the two limits, if required (because the m_pUpper contains the lower limit and viceversa).
bool math_isFinite () const
 Returns TRUE if this range has a finite lower and upper limit.
void math_Set (const mcPolynomial &l=mcEmptyElement, const mcPolynomial &u=mcEmptyElement)
void math_Set (const mcRealValue &l=*mcRealValue::pNAN, const mcRealValue &u=*mcRealValue::pNAN)
void math_Set (mcSet newset, mcBoundaryMode m)
mcSet math_GetSet () const
mcBoundaryMode math_GetBoundaryMode () const
const mcPolynomialmath_GetUpperLimit () const
const mcPolynomialmath_GetLowerLimit () const
mcRealValue math_GetUpperLimitValue () const
mcRealValue math_GetLowerLimitValue () const
wxString io_GetInlinedExpr () const
 Returns the inlined expression which represents this object.

Static Public Attributes

static mcRangepN = NULL
 A range which goes from zero to +inf of N.
static mcRangepZ = NULL
 A range which goes from -inf to +inf of Z.
static mcRangepR = NULL
 A range which goes from -inf to +inf of R.
static mcRangepC = NULL
 A range which goes from -inf to +inf of C.
static mcRangepEmpty = NULL
 A range which goes from zero to zero of N.

Protected Attributes

mcPolynomial m_pUpper
 The upper limit of this range. This should never be NULL.
mcPolynomial m_pLower
 The lower limit of this range. This should never be NULL.
mcBoundaryMode m_nBounds
 One of the boundaries-mode for this range. See mcBoundaryMode.
mcSet m_nSet
 The set to which the upper and lower limits belong.


Constructor & Destructor Documentation

mcRange::mcRange const mcRealValue l = *mcIntegerValue::pZero,
const mcRealValue u = *mcIntegerValue::pOne,
mcSet  s = mcSET_R,
mcBoundaryMode  m = mcBM_INCLUDE_BOTH
[inline]
 

Builds this range object with polynomials containing only the given values.

Definition at line 75 of file Range.h.

References math_Set().

Referenced by data_Clone().

mcRange::mcRange const mcPolynomial l,
const mcPolynomial u,
mcSet  s = mcSET_R,
mcBoundaryMode  m = mcBM_INCLUDE_BOTH
[inline]
 

Builds this range object copying the given upper & lower limits.

Definition at line 82 of file Range.h.

References math_Set().

mcRange::~mcRange  )  [virtual]
 

Definition at line 504 of file MathHelpers.cpp.


Member Function Documentation

mcRange* mcRange::data_Clone  )  const [inline]
 

Returns a clone of this class.

Definition at line 92 of file Range.h.

References m_nBounds, m_nSet, m_pLower, m_pUpper, and mcRange().

wxString mcRange::io_GetInlinedExpr  )  const
 

Returns the inlined expression which represents this object.

This is typically a string like [a,b] or [a,b) or (a,b] or (a,b) for the different values of m_nSet.

Definition at line 550 of file MathHelpers.cpp.

References mcElement::io_GetInlinedExpr(), m_nBounds, m_pLower, m_pUpper, mcBM_EXCLUDE_LCHAR, mcBM_EXCLUDE_RCHAR, mcBM_INCLUDE_BOTH, mcBM_INCLUDE_LCHAR, mcBM_INCLUDE_LEFT, mcBM_INCLUDE_NONE, mcBM_INCLUDE_RCHAR, and mcBM_INCLUDE_RIGHT.

mcBoundaryMode mcRange::math_GetBoundaryMode  )  const [inline]
 

Definition at line 111 of file Range.h.

References m_nBounds.

const mcPolynomial& mcRange::math_GetLowerLimit  )  const [inline]
 

Definition at line 113 of file Range.h.

References m_pLower.

mcRealValue mcRange::math_GetLowerLimitValue  )  const
 

Definition at line 535 of file MathHelpers.cpp.

References m_pLower, and mcElement::math_Evaluate().

Referenced by mcBisectSolver::math_SolveLine().

mcSet mcRange::math_GetSet  )  const [inline]
 

Definition at line 110 of file Range.h.

References m_nSet.

const mcPolynomial& mcRange::math_GetUpperLimit  )  const [inline]
 

Definition at line 112 of file Range.h.

References m_pUpper.

mcRealValue mcRange::math_GetUpperLimitValue  )  const
 

Definition at line 538 of file MathHelpers.cpp.

References m_pUpper, and mcElement::math_Evaluate().

Referenced by mcBisectSolver::math_SolveLine().

bool mcRange::math_isFinite  )  const
 

Returns TRUE if this range has a finite lower and upper limit.

Definition at line 529 of file MathHelpers.cpp.

References m_pLower, m_pUpper, and mcElement::math_isFinite().

Referenced by mcExtRange::math_isFinite().

void mcRange::math_Order  ) 
 

Swaps the two limits, if required (because the m_pUpper contains the lower limit and viceversa).

void mcRange::math_Set mcSet  newset,
mcBoundaryMode  m
[inline]
 

Definition at line 107 of file Range.h.

References m_nBounds, and m_nSet.

void mcRange::math_Set const mcRealValue l = *mcRealValue::pNAN,
const mcRealValue u = *mcRealValue::pNAN
 

Definition at line 508 of file MathHelpers.cpp.

References m_pLower, m_pUpper, and mcElementArray::math_WrapNumber().

void mcRange::math_Set const mcPolynomial l = mcEmptyElement,
const mcPolynomial u = mcEmptyElement
 

Definition at line 523 of file MathHelpers.cpp.

References m_pLower, m_pUpper, and mcEmptyElement.

Referenced by mcRange().


Member Data Documentation

mcBoundaryMode mcRange::m_nBounds [protected]
 

One of the boundaries-mode for this range. See mcBoundaryMode.

Definition at line 58 of file Range.h.

Referenced by data_Clone(), io_GetInlinedExpr(), math_GetBoundaryMode(), and math_Set().

mcSet mcRange::m_nSet [protected]
 

The set to which the upper and lower limits belong.

Definition at line 61 of file Range.h.

Referenced by data_Clone(), math_GetSet(), and math_Set().

mcPolynomial mcRange::m_pLower [protected]
 

The lower limit of this range. This should never be NULL.

Definition at line 55 of file Range.h.

Referenced by data_Clone(), io_GetInlinedExpr(), math_GetLowerLimit(), math_GetLowerLimitValue(), math_isFinite(), and math_Set().

mcPolynomial mcRange::m_pUpper [protected]
 

The upper limit of this range. This should never be NULL.

Definition at line 52 of file Range.h.

Referenced by data_Clone(), io_GetInlinedExpr(), math_GetUpperLimit(), math_GetUpperLimitValue(), math_isFinite(), and math_Set().

mcRange * mcRange::pC = NULL [static]
 

A range which goes from -inf to +inf of C.

Definition at line 59 of file MathHelpers.cpp.

mcRange * mcRange::pEmpty = NULL [static]
 

A range which goes from zero to zero of N.

Definition at line 60 of file MathHelpers.cpp.

mcRange * mcRange::pN = NULL [static]
 

A range which goes from zero to +inf of N.

Definition at line 56 of file MathHelpers.cpp.

mcRange * mcRange::pR = NULL [static]
 

A range which goes from -inf to +inf of R.

Definition at line 58 of file MathHelpers.cpp.

mcRange * mcRange::pZ = NULL [static]
 

A range which goes from -inf to +inf of Z.

Definition at line 57 of file MathHelpers.cpp.


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

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

[ Top ]