#include <string>
#include <map>
Go to the source code of this file.
Functions |
ASTNode * | create_expression (const ASTNode *pSource, const ListOfFunctionDefinitions *pFunctions) |
CNormalFraction * | create_simplified_normalform (const ASTNode *pSource) |
CNormalFraction * | create_normalform (const ASTNode *pSource) |
bool | are_equal (const CNormalFraction *pLHS, const CNormalFraction *pRHS) |
void | normalize_variable_names (CNormalBase *pBase, std::map< std::string, std::string > &variableMap) |
ASTNode * | replace_variable_names (const ASTNode *pNode, const std::map< std::string, const ASTNode * > &argumentMap) |
ASTNode * | expand_function_call (const ASTNode *pCall, const ListOfFunctionDefinitions *pFunctions) |
ASTNode * | expand_function_calls (const ASTNode *pNode, const ListOfFunctionDefinitions *pFunctions) |
CEvaluationNode * | expand_function_calls (const CEvaluationNode *pNode, CFunctionDB *pFunctionDB) |
CEvaluationNode * | expand_function_call (const CEvaluationNodeCall *pNode, CFunctionDB *pFunctionDB) |
CEvaluationNode * | replace_variable_names (const CEvaluationNode *pNode, const std::map< std::string, const CEvaluationNode * > &argumentMap) |
ASTNode * | replace_SEC (const ASTNode *pChild) |
ASTNode * | replace_CSC (const ASTNode *pChild) |
ASTNode * | replace_COT (const ASTNode *pChild) |
ASTNode * | replace_SINH (const ASTNode *pChild) |
ASTNode * | replace_COSH (const ASTNode *pChild) |
ASTNode * | replace_TANH (const ASTNode *pChild) |
ASTNode * | replace_SECH (const ASTNode *pChild) |
ASTNode * | replace_CSCH (const ASTNode *pChild) |
ASTNode * | replace_COTH (const ASTNode *pChild) |
ASTNode * | replace_ARCSINH (const ASTNode *pChild) |
ASTNode * | replace_ARCCOSH (const ASTNode *pChild) |
ASTNode * | replace_ARCTANH (const ASTNode *pChild) |
ASTNode * | replace_ARCSECH (const ASTNode *pChild) |
ASTNode * | replace_ARCCSCH (const ASTNode *pChild) |
Function Documentation
This method takes two normalforms and normalizes the variable names in both expressions. Afterwards the two expressions are compared. If they are equal true is returned.
ASTNode* create_expression |
( |
const ASTNode * |
pSource, |
|
|
const ListOfFunctionDefinitions * |
pFunctions |
|
) |
| |
Creates an expanded expression from the given expression. This method expands all function calls. On failure NULL is returned, otherwise an expanded copy of the original node is returned.
This method converts a given ASTNode into a CNormalFraction. The resulting normalform is not necessarily simplified.
This method converts a given ASTNode into a CNormalFraction. The expression is simplified in the process to create the "final" normalform.
ASTNode* expand_function_call |
( |
const ASTNode * |
pCall, |
|
|
const ListOfFunctionDefinitions * |
pFunctions |
|
) |
| |
This method expands the given function call. On failure NULL is returned, otherwise on expression of the expanded function call is returned.
This method expands the given function call. On failure NULL is returned, otherwise on expression of the expanded function call is returned.
ASTNode* expand_function_calls |
( |
const ASTNode * |
pNode, |
|
|
const ListOfFunctionDefinitions * |
pFunctions |
|
) |
| |
This method expands the function calls in the given expression. On failure NULL is returned, otherwise a copy of the original node is returned where all function calls have been expanded.
This method expands the function calls in the given expression. On failure NULL is returned, otherwise a copy of the original node is returned where all function calls have been expanded.
void normalize_variable_names |
( |
CNormalBase * |
pBase, |
|
|
std::map< std::string, std::string > & |
variableMap |
|
) |
| |
This method normalizes the variable names in a given normalform expression. The first variable found in the expression is named "variable1", the second "variable2" and so on.
ASTNode* replace_ARCCOSH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to ARCCOSH by log(X + sqrt(X-1) * sqrt(X+1))
ASTNode* replace_ARCCSCH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to ARCCSCH by log(sqrt(1+ (1/ (X^2)))+(1/X))
ASTNode* replace_ARCSECH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to ARCSECH by log(sqrt((1/X)-1) * sqrt(1+(1/X)) + 1/X)
ASTNode* replace_ARCSINH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to ARCSINH by log(X + sqrt(X^2 + 1))
ASTNode* replace_ARCTANH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to ARCTANH by 1/2 * (log(1+X) - log(1-X))
ASTNode* replace_COSH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to COSH by (e^X+e^(-X))/2
ASTNode* replace_COT |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to COT by COS/SIN.
ASTNode* replace_COTH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to COTH by (e^X+e^(-X))/(e^X-e^(-X))
ASTNode* replace_CSC |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to CSC by 1/SIN.
ASTNode* replace_CSCH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to CSCH by 2/(e^X-e^(-X))
ASTNode* replace_SEC |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to SEC by 1/COS.
ASTNode* replace_SECH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to SECH by 2/(e^X+e^(-X))
ASTNode* replace_SINH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to SINH by (e^X-e^(-X))/2.
ASTNode* replace_TANH |
( |
const ASTNode * |
pChild | ) |
|
This function replaces a call to TANH by (e^X-e^(-X))/(e^X+e^(-X))
ASTNode* replace_variable_names |
( |
const ASTNode * |
pNode, |
|
|
const std::map< std::string, const ASTNode * > & |
argumentMap |
|
) |
| |