-
这是一个简单的演示如何评价文本的数学表达式
This a simple demo of how to evaluate mathematical expressions in text
format, including provision for variables and functions. The code consists of
three simple classes: 1) Calc - which does the main calculations, 2) Stack -
which is used to push and pop intermediate operators and numbers and 3)
Symbol Table. The symbol table is a collection of calc symbols, a type structure
consisting of various elements, including the expression name, function name,
and the final value of the expression The evaluation procedure is done in three
steps: 1) simplify the expression by removing all the elements within () and
storing them in subexpressions within the symbol table. 2) Each of these sub
expressions are then converted to RPN format (Reverse polar notation) and
evaluated 3) Finally, the main expression is converted to RPN and evaluated-This is a simple demo of how to evaluate mathematical expressions in text
format, including provision for variables and functi
- 2022-02-20 06:26:41下载
- 积分:1
-
经典层合板理论模型
根据经典的复合材料层合板理论计算层合板在受拉及受弯时的应力应变分布,可任意设置层合板中每层的厚度,方向角。可提取层合板的膜应变和曲率,进而得到每层的应力应变(包括主轴方向和偏轴方向)
- 2022-02-06 09:05:45下载
- 积分:1
-
C++ 字符串分割函数
C++ split函数,可以实现字串的分割。可自定义分割符号,方便在编程时使用,根据需求设定分割字符或字符串均可。实用测试正常。
- 2022-01-27 22:56:48下载
- 积分:1
-
k-均值算法 python
均值比率
试图生成速度快、 内存效率的 K-均值程序。
安装
gem来源-http://rubygems.org
sudo gem安装 k_means
如何使用
需要 "rubygems"
要求 "k_means"
数据 = [[1,1]、 [1,2],[1,1],[1000年、 1000年],[500、 500]]
kmeans = KMeans.new (数据,: 质心 = > 2)
kmeans.inspect # 使用 kmeans.view 拿到未检查数组
= > [[3,4],[0,1,2]]
自定义的质心
需要 "rubygems"
要求 "k_means"
# 您自定义的质心需要有 #position 和 #reposition 的方法
类 CustomCentroid
attr_acces
- 2022-04-28 00:29:05下载
- 积分:1
-
保存计算过程的计算器
随着计算机技术的飞速发展,人们已经不能满足于采用人工进行大量的计算,计算器快速的计算速度和稳定的准确率很好的满足了用户的需要,保存计算过程的计算器更是能够让用户随时随地的查找以前的计算过程。保存计算过程的计算器正是在这样的市场需求之下研发的,目的旨在帮助用户快速准确的得到计算结果。掌握Java语言编程的基础知识并能熟练运用,熟悉类声明与对象的使用,理解委托时间处理模型,了解Java语言的图形用户界面的设计知识,运用JCreator编写简单计算器程序,并实现其
- 2022-08-24 05:48:54下载
- 积分:1
-
数独程序源码
新加坡总理李显龙两周前在一个创业者论坛上透露,他最后编写的一个程序是解决数独问题的程序(Sudoku solver),还是多年前用 C++ 实现的。此程序就是李显龙所编。 李显龙说:这个程序非常基础,在 DOS 窗口下运行。按行输入数据(比如:1-3-8—6),程序会打印出解决方案(如果有多种方案,则输出所有的)、程序所用的步数,还有一些搜索数据。该程序做了回溯搜索,选择下一个扇出(fanout)最小的单元格。
- 2022-10-23 20:50:03下载
- 积分:1
-
一阶导数hermite插值。
一阶导数hermite插值。-a derivative hermite interpolation.
- 2023-01-12 23:45:03下载
- 积分:1
-
矩阵运算函数
用C++实现对矩阵的一些运算,包括反转180度,旋转90度,270度,合并等,在主函数给出测试。
- 2022-11-18 12:55:02下载
- 积分:1
-
java sort
java排序
- 2022-12-31 21:15:04下载
- 积分:1
-
浮动
浮点复数基2时分FFT完成适当的FFT,输出改写输入缓冲器。-floating-point complex FFT-based two hours to complete the FFT output rewritten input buffer.
- 2022-03-13 16:30:13下载
- 积分:1