OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
mathexpr.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "mathexpr.h"
Include dependency graph for mathexpr.c:

Classes

struct  TreeNode
 

Macros

#define _CRT_SECURE_NO_DEPRECATE
 
#define MAX_STACK_SIZE   1024
 

Typedefs

typedef struct TreeNode ExprTree
 

Functions

double mathexpr_eval (MathExpr *expr, double(*getVariableValue)(int))
 
void mathexpr_delete (MathExpr *expr)
 
MathExprmathexpr_create (char *formula, int(*getVar)(char *))
 

Variables

char * MathFunc []
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

◆ MAX_STACK_SIZE

#define MAX_STACK_SIZE   1024

Typedef Documentation

◆ ExprTree

typedef struct TreeNode ExprTree

Function Documentation

◆ mathexpr_create()

MathExpr * mathexpr_create ( char *  formula,
int(*)(char *)  getVar 
)
Here is the caller graph for this function:

◆ mathexpr_delete()

void mathexpr_delete ( MathExpr expr)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mathexpr_eval()

double mathexpr_eval ( MathExpr expr,
double(*)(int)  getVariableValue 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ MathFunc

char* MathFunc[]
Initial value:
= {"COS", "SIN", "TAN", "COT", "ABS", "SGN",
"SQRT", "LOG", "EXP", "ASIN", "ACOS", "ATAN",
"ACOT", "SINH", "COSH", "TANH", "COTH", "LOG10",
"STEP", NULL}