wxEcMath - Official documentation  0.6.4
Classes | Macros | Enumerations
ec_defs.h File Reference

Definition of the simpliest classes and constants. More...

Classes

struct  wxEcPosition
 Stores an expression and two indexes (From/To) More...
 
class  wxEcUPoint
 Stores 2 unsigned integers. More...
 

Macros

#define wxECM_USEDEBUG
 
#define wxECD_SOFTWARE   wxT("wxEcMath")
 
#define wxECD_URL   wxT("http://sourceforge.net/projects/wxecmath/")
 
#define wxECD_VERSION   wxT("0.6.4")
 
#define wxECD_AVERAGESPEED   9000
 
#define wxECD_OPERATORS   wxT("^/*%-+")
 
#define wxECD_ALPHABET   wxT("abcdefghijklmnopqrstuvwxyz")
 
#define wxECD_NUMERIC   wxT("0123456789")
 
#define wxECD_EXTRASYMBOLS   wxT("_().#")
 
#define wxECD_PERMITTED   wxT("abcdefghijklmnopqrstuvwxyz0123456789^/*%-+_().#")
 
#define wxECD_STACKMAX   128
 
#define wxECD_CURVEMAX   64
 
#define wxECD_STEPSMAX   64
 
#define wxECD_RESOLUTION   500
 
#define wxECD_DXSTEP   0.0001
 
#define wxECD_RETICULESIZE   3
 
#define wxECD_ZOOMFACTOR   1.5
 

Enumerations

enum  {
  wxECE_NOERROR = 0, wxECE_SYNTAX, wxECE_UNDEFCONSTANT, wxECE_MEMORYEXCEEDED,
  wxECE_DIVBYZERO, wxECE_DOMAINERROR, wxECE_UNKNOWNFUNC, wxECE_STACKERROR,
  wxECE_UNCOMPUTABLE
}
 
enum  { wxECA_RADIAN = 0, wxECA_DEGREE, wxECA_GRADIAN }
 
enum  { wxECT_CARTESIAN = 0, wxECT_PARAMETRIC, wxECT_POLAR, wxECT_CLOUD }
 

Detailed Description

Definition of the simpliest classes and constants.

Author
ecrucru
Version
0.6.4
Date
August 2008

Implements the definition of core elements needed by the wxEcMath classes. Before compiling a release, please take a look to wxECM_USEDEBUG. This can increase the performances of your software very significantly.

Macro Definition Documentation

#define wxECD_ALPHABET   wxT("abcdefghijklmnopqrstuvwxyz")

All the letters of the alphabet, written in lowercase (a-z).

#define wxECD_AVERAGESPEED   9000

Average computations you can make in 1 second. Allows you to predict the time needed in complex algorithms. The value depends on wxECM_USEDEBUG.

Remarks
The formula chosen to evaluate the speed is "(1+sqrt(5))/2-2*cos(2*pi/5)". Depending on the length of your formula, you won't get exactly this speed. Maybe more, maybe less. However this value should be representative of most of cases.
See also
wxECM_USEDEBUG
#define wxECD_CURVEMAX   64

Maximal number of curves you can define.

See also
wxEcPlot::AddCurve()
#define wxECD_DXSTEP   0.0001

The step used to approximate the derivative of a curve at a given point.

See also
wxEcPlot::DrawDerivative()
#define wxECD_EXTRASYMBOLS   wxT("_().#")

Extra symbols available when evaluated.

#define wxECD_NUMERIC   wxT("0123456789")

All the numbers supported (0-9).

#define wxECD_OPERATORS   wxT("^/*%-+")

All the operators supported, ordered by mathematical priority.

#define wxECD_PERMITTED   wxT("abcdefghijklmnopqrstuvwxyz0123456789^/*%-+_().#")

Allowed ANSI characters are defined here. Since 0.6.1, you can define a constant with the name of your choice. It means you can use a chinese or japanese name if you have enabled "UNICODE". This choice is automatically performed.

#define wxECD_RESOLUTION   500

Default number of points used to draw a parametric or a polar curve. The value applies to a curve, not to all the curves loaded in a wxEcPlot.

See also
wxEcCurve::NumPoints
#define wxECD_RETICULESIZE   3

The radius of the reticule.

See also
wxEcPlot::SetReticule()
#define wxECD_SOFTWARE   wxT("wxEcMath")

Name of the software.

#define wxECD_STACKMAX   128

Maximal number of constants you may define.

Maximal number of entities that an inline expression may contain (a+b*c = 3 entities).

#define wxECD_STEPSMAX   64

Maximal number of graduations a plot may contain.

#define wxECD_URL   wxT("http://sourceforge.net/projects/wxecmath/")

Internet address where you can download the software.

#define wxECD_VERSION   wxT("0.6.4")

Version of the software currently used.

#define wxECD_ZOOMFACTOR   1.5

The default zoom factor.

See also
wxEcPlot::SetZoomFactor()
#define wxECM_USEDEBUG

When defined, extra features are compiled inside wxEcEngine. They were implemented during the development of wxEcMath to track bugs. For a lambda-user, there is no need to use them (performances would be more than 2 times slower).

To enable these features without editing the library, you can write :

1 #define wxECM_USEDEBUG
2 #include "ec_defs.h"
3 #include "ec_engine.h"

But it is really better to define wxECM_USEDEBUG as a preprocessor definition. Thus it will apply to the whole project. You can do by editing the settings of the project, or by adding /DwxECM_USEDEBUG=1 in the command line.

See also
wxEcEngine
wxEcEngine::LogAction()
wxEcEngine::GetLog()

Enumeration Type Documentation

anonymous enum

Error codes returned by wxEcEngine::Compute().

See also
wxEcEngine::GetLastError()
Enumerator
wxECE_NOERROR 

No error.

wxECE_SYNTAX 

The syntax is not correct.

wxECE_UNDEFCONSTANT 

The constant is not defined.

wxECE_MEMORYEXCEEDED 

The maximal number of constants/curves that you may define is reached.

See also
wxECD_STACKMAX
wxECE_DIVBYZERO 

Division by zero

wxECE_DOMAINERROR 

The function is not defined for the given value.

wxECE_UNKNOWNFUNC 

The name of the function is unknown.

wxECE_STACKERROR 

The expression is too long to be evaluated.

See also
wxECD_STACKMAX
wxECE_UNCOMPUTABLE 

Generic error.

anonymous enum

Trigonometric modes. Radian is the default mode.

See also
wxEcEngine::GetTrigonometricMode()
wxEcEngine::SetTrigonometricMode()
Enumerator
wxECA_RADIAN 

Radian.

wxECA_DEGREE 

Degree.

wxECA_GRADIAN 

Gradian.

anonymous enum

Types of curves you can draw.

See also
wxEcCurve
Enumerator
wxECT_CARTESIAN 

Cartesian: y = f(x)

wxECT_PARAMETRIC 

Parametric: x = f(t) && y = f(t)

wxECT_POLAR 

Polar : r = f(t)

wxECT_CLOUD 

Graphical representation : data from experiments, evolution of the stock exchange...




Documentation generated with Doxygen 1.8.10
Hosted on :
Get wxEcMath at SourceForge.net