A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/muParserComplex_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/utils/muparser/muParserComplex.cpp Source File

33 #if defined(MUP_UNICODE) 34 #define _stscanf swscanf 36 #define _stscanf sscanf 39 #define wxT(x) MUP_T(x) 55  return

PackToDouble(sin(c));

62  return

PackToDouble(cos(c));

69  return

PackToDouble(tan(c));

76  return

PackToDouble(sqrt(c));

83

c2 = UnpackToComplex(

v2

);

84  return

PackToDouble(c1+c2);

91

c2 = UnpackToComplex(

v2

);

92  return

PackToDouble(c1-c2);

99

c2 = UnpackToComplex(

v2

);

100  return

PackToDouble(c1*c2);

107

c2 = UnpackToComplex(

v2

);

108  return

PackToDouble(c1/c2);

141

ParserComplex::ParserComplex()

154  DefineNameChars

(

wxT

(

"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

) );

193  float

imag(0), real(0);

195

real = *((

float

*)(&

val

));

196

imag = *((

float

*)(&

val

)+1);

205  float

*real = (

float

*)(&packed),

206

*imag = (

float

*)(&packed)+1;

Mathematical expressions parser (base parser engine).

void AddValIdent(identfun_type a_pCallback)

void DefineInfixOprt(const string_type &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX, bool a_bAllowOpt=true)

Add a user defined operator.

value_type Eval() const

Calculate the result.

void DefineOprt(const string_type &a_strName, fun_type2 a_pFun, unsigned a_iPri=0, bool a_bAllowOpt=false)

Define a binary operator.

void DefineOprtChars(const char_type *a_szCharset)

Define the set of valid characters to be used in names of binary operators and postfix operators.

void DefineInfixOprtChars(const char_type *a_szCharset)

Define the set of valid characters to be used in names of infix operators.

void DefineNameChars(const char_type *a_szCharset)

Define the set of valid characters to be used in names of functions, variables, constants.

void EnableBuiltInOprt(bool a_bIsOn=true)

Enable or disable the built in binary operators.

void DefineFun(const string_type &a_strName, fun_type0 a_pFun, bool a_bAllowOpt=true)

static value_type Sub(value_type v1, value_type v2)

static value_type Add(value_type v1, value_type v2)

static double PackToDouble(const complex_type &val)

virtual void InitOprt()

Initialize operators.

static value_type Sin(value_type)

std::complex< float > complex_type

static value_type Cos(value_type)

static int IsVal(const char_type *a_szExpr, int *a_iPos, value_type *a_iVal)

static value_type Mul(value_type v1, value_type v2)

static value_type Tan(value_type)

static value_type Sqrt(value_type)

static value_type Div(value_type v1, value_type v2)

static complex_type UnpackToComplex(double val)

static value_type UnaryMinus(value_type)

virtual void InitCharSets()

This file contains a definition of a parser using complex numbers.

Namespace for mathematical applications.

string_type::value_type char_type

The character type used by the parser.

@ prMUL_DIV

multiplication/division

double value_type

The numeric datatype used by the parser.

std::string string_type

The stringtype used by the parser.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4