首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > C + + 中的快速模表达式求值

C + + 中的快速模表达式求值

  • 资源大小:137.19 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 算法 c++

资 源 简 介

这是 c + + 中的快速模表达式求值。它有没有其他库的依赖,将使用 g + + 在 Linux 上构建 / Mac / Android 或在 Windows 上使用 MSVC。它有一个非常简单的界面: CFloatExpression 前 ;或 CExpression < 浮法 > ex。解析 ("1 + 1") ; std:: cout << ex.t_Evaluate() << std::endl ; 打印 2 它是一个模板,所以它可工作于不同类型 (浮点、 双,复杂,......,为 int)。它支持"C"的标准就是 math.h 功能的所有运算符。它还支持变量: CFloatExpression 前 ;或 CExpression < 浮法 > ex。解析 ("2 * pi() * r") ; 前女友。SetVariable ("r",10) ; std:: cout << ex.t_Evaluate() << std::endl ; 打印 62.82...... 前女友。SetVariable ("r",100) ;设置一个不同的变量 std:: cout << ex.t_Evaluate() << std::endl ; 打印 628.2...... 它实现了一个简单的递归下降分析器,它是相当快的它可以评估超过 100 万的每秒标准笔记本电脑的 PC 上的方程。

文 件 列 表

Doxyfile
ExpEval.cpp
ExpEval.h
ExpEval_Test.sln
ExpEval_Test.suo
ExpEval_Test.vcproj
ExpEval_Test.vcproj.PCPOLOK2.-tHE_SWINe-.user
Main.cpp
Makefile
Debug
html
annotated.html
bc_s.png
bdwn.png
classes.html
class_c_expression-members.html
class_c_expression.html
class_c_exp_eval_lexer-members.html
class_c_exp_eval_lexer.html
class_c_exp_eval_tester-members.html
class_c_exp_eval_tester.html
closed.png
doxygen.css
doxygen.png
dynsections.js
FreeSans.ttf
ftv2blank.png
ftv2cl.png
ftv2doc.png
ftv2folderclosed.png
ftv2folderopen.png
ftv2lastnode.png
ftv2link.png
ftv2mlastnode.png
ftv2mnode.png
ftv2mo.png
ftv2node.png
ftv2ns.png
ftv2plastnode.png
ftv2pnode.png
ftv2splitbar.png
ftv2vertline.png
functions.html
functions_func.html
functions_type.html
functions_vars.html
index.html
jquery.js
nav_f.png
nav_g.png
nav_h.png
open.png
struct_c_expression_1_1_t_node-members.html
struct_c_expression_1_1_t_node.html
sync_off.png
sync_on.png
tabs.css
tab_a.png
tab_b.png
tab_h.png
tab_s.png
Release
Documentation.lnk
VIP VIP
0.183526s