首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 156 毫秒
1.
本文介绍计算作为字符串输入的数学表达式的一种方法。在信号处理与系统仿真软件中采用这种方法,可使用户能用人机交互方式从键盘指定时间序列或系统输入的数学表达式,从而提高软件的灵活性与实用性。  相似文献   

2.
基于字符串的逻辑表达式的合法性进行判断在很多领域和场合下是经常遇到的 ,比如 :文件检索 ,信息查询等等 .而我们常见的文件检索与信息查询软件大多仅仅支持几个简单的逻辑算符 ,例如 :与、或 ,并且逻辑表达式中的组成字符串只能做简单的与、或运算 ,使得逻辑表达式的表达能力有限 ,用户使用的灵活性小 .本文针对上述问题进行了研究 ,采用算符优先算法给出了对该问题一种非常实用而又简练的实现方法 ,不但实现了普通搜索引擎所支持的简单的逻辑表达式的合法性判断功能 ,而且扩展了所支持的逻辑表达式的逻辑表达能力 :支持非运算 ;增加了支持逻辑表达式的优先级算符“(”和“)”.这使得逻辑表达式的表达功能和表达灵活性都得到很大的增强和提高 .本文给出的算法还可用于许多其他的基于字符串的逻辑表达式的操作功能 .  相似文献   

3.
在@…GET语句中有四个与数据格式和数据合法性相关的子句,它们是:PICTURE、FUNCTION、RANGE和VALID,前三者在使用时必须按规定形式和符号描述数据的输入输出格式、类型和范围,而VALID子句的内容为一逻辑表达式,故而它在程序中的应用就较为灵活。VALID子句的逻辑表达式,可以是直接与当前录入数据相关的表达式,也可是用户自定义的函数组成,如果该逻辑表达式的值为真,该项输入被认为是正确的,结束该项输入;如果该逻辑表达式的值为假,该项输入则被认为是不正确的,要求用户重新输入数据,这一过程直到逻辑表达式的值为真或用户按下Esc键为止,正是由于可以在逻辑表达式中使用用户自定义函数,使得我们能对数据的录入及合法性检验实施更为有利的手段,事实上,恰当地运用这种方法,不仅能完成某种特殊的任务,甚至在一定的程  相似文献   

4.
句法错误是数学文本表达式输入技术中最基本的错误形式。提出一种基于模式识别的初等数学表达式的文本句法自动检测方法,它是通过检测表达式中相邻两基元的数学排列规则来检测表达式中的文本句法错误。相邻两基元是通过对表达式的一维扫描搜索来得到,相邻两基元的检测通过模板匹配的方法来实现。数学文本表达式采用计算机键盘输入,输入格式符合人的读写习惯和计算机处理的要求。实验结果表明,该检测方法简单,算法设计容易,仅用一次扫描即可完成对表达式的句法检测,且检测速度快,正确检测率为100%。  相似文献   

5.
计算算术表达式大多是用栈的方法来计算的。繁琐不说,而且不符合人们的常规计算方法。也有小学奥赛的书籍介绍用字符串计算算术表达式,但比较简单。经过几个月的时间实验。研究了一种新的方法计算算术表达式。  相似文献   

6.
数学表达式是现代计算机科学中必不可少的组成部分,数学教学软件中如果缺少数学表达式有效性的判定,将会严重影响软件的运行效率和用户体验。针对此问题提出了一种采用递归方法来判别数学表达式有效性的方法。首先对表达式进行规格化处理,然后遍历数学表达式,进行括号匹配、运算符优先级处理和数学基本初等函数识别,最后进行常量的识别。对其中遇到的问题进行了讨论,并提供了解决方案。该方法已经应用于数学软件、远程教育等应用领域的函数作图中,当用户输入表达式错误时,它能够及时提醒用户输入的错误位置,达到了很好的效果。实验表明:数学表达式的有效性判别可以显著提高教学软件、函数作图的效率,改善用户体验。  相似文献   

7.
这一章叙述CBASIC/16提供的予定义函数。如3.5节所述,可使用予定义函数组成表达式。当予定义函数含有自变量时,这些自变量的取值,可以为任何正确类型,或为数值型或为字符串型的有效表达式。一般来讲,当需要数值型表达式时,实型和整型的自变量可以交替使用。然而,使用不需要转换的自变量组成表达式,可以提高效率。自变量的类型规定如下,字符串自变  相似文献   

8.
算符优先法是算术表达式求值的一种常见算法,然而,算符优先法识别错误表迭式的能力较弱.为了在计算正确表达式的同时,准确识别错误表达式,本文提出用SLR分析法处理表达式.发现表达式有错时计算过程立即终止,向用户报告出错信息.未发现错误时,返回计算结果.  相似文献   

9.
在编译的语言环境中写出一个数学表达式字符串,不用编写代码解释程序,巧妙地应用嵌入式语言,由它动态解释并执行这个表达式进行求值。并设计解决了不同语言变量值的相互引用及文本编辑框之当前光标处输入内容的难题。  相似文献   

10.
在编译的语言环境中写出一个数学表达式字符串,不用编写代码解释程序,巧妙地应用嵌入式语言,由它动态解释并执行这个表达式进行求值。并设计解决了不同语言变量值的相互引用及文本编辑框之当前光标处输入内容的难题。  相似文献   

11.
《Computers & chemistry》1988,12(3):209-211
A program package is described for making nonlinear least-squares calculations on a personal computer. The numerical calculation is performed after the given expression has been analytically differentiated with respect to the nonlinear parameters; the differentiation is performed automatically. Another feature of the program is that estimation of the initial values of the parameters has been partially automated.  相似文献   

12.
13.
最优化设计的程序实现方法决定了优化算法的执行效率及代码可读性,进而影响到优化设计在工程中的应用前景.最优化设计算法中常涉及到复杂的矩阵运算.通过分析比较几类实现矩阵运算的常用方法的优缺点,提出了基于C 表达式模板的最优化设计程序实现方法.最后,以DFP变尺度优化程序为实例,从程序可读性及执行效率上将几类方法进行了对比.结果表明,基于C 表达式模板实现的最优化设计程序在保证程序执行效率的基础上,能够提高程序的可重用性及可读性.  相似文献   

14.
在国产申威高性能多核服务器系统中,基础编译系统对应用程序中访存操作进行代码生成时,没有考虑国产处理器指令特征,导致编译器生成的访存地址计算代码效率较低,影响国产高性能处理器的性能。为充分发挥国产处理器高性能计算能力,提出一种加速访存地址计算的编译优化方法。加速访存地址计算编译优化基于处理器支持带扩展因子的运算指令,在编译器后端内存地址表达式合法性检查中,添加针对乘加模式的地址计算表达式合法性检查算法,自动识别地址表达式中存在的乘加运算并进行合法性检验,对符合条件的地址表达式在代码生成阶段匹配生成带扩展因子的运算指令来快速计算访存地址,从而加快访存指令的发射与执行以及应用程序中的访存地址生成,提升访存效率。使用行业标准性能测试集SPEC CPU2006对优化效果进行评测,结果表明,相比优化前SPECspeed Integer与SPECspeed Float Point两个子集,该优化方法平均性能分别提高了2.53%与1.50%。  相似文献   

15.
李善姬  芦成刚 《计算机工程与设计》2006,27(18):3486-3487,3490
结合VB编程简单、界面友好的特点及MATLAB强大的计算、图形表达功能,采用VB与MATLAB的混合编程,可以开发出效率高、使用方便的应用程序.利用ActiveX技术和文件传递参数,解决了VB与MATLAB的混合编程并应用于数字滤波器的设计上,利用该方法设计了FIR数字滤波器.  相似文献   

16.
Principal components analysis (PCA) is useful for reproducing the total variation among hundreds or thousands of continuously-scaled variables with a much smaller number of unobservable variables called 'latent factors'. The CLUSFAVOR computer program was used to implement PCA for identifying groups of genes with similar expression profiles from a large number of genes used on DNA microarrays. This paper describes the principal components solution to the factor model of the correlation matrix R, calculation of eigenvalues and eigenvectors of R, extraction of factors, and calculation of factor loadings and identification of genes with similar loading patterns to construct groups of genes with similar expression profiles. With regard to extraction of factors, it was found that more than 90% of the total variance in input data could be accounted for by extracting factors whose eigenvalues exceed unity. Bipolar factors containing strong positive and negative loadings can also be used for identifying two unique groups of genes, since expression profiles of genes that load positive are unlike expression profiles of genes that load negative on the same factor. While PCA does not provide the absolute answer to a multidimensional problem, it nevertheless can provide a heuristic with which natural groupings of genes with similar expression profiles can be assembled. While cluster analysis essentially generates a single dendogram (tree branch) containing every gene in the input data, PCA can be used to assemble gene expression profiles that strongly correlate with the latent factors accounting for a majority of total variance. Example results for CLUSFAVOR computer program runs are provided.  相似文献   

17.
RNA interference (RNAi) is a popular and effective method for silencing gene expression. siRNAs should be gene-specific and effective to achieve specific and potent gene silencing. However, most currently available siRNA design programs are web-based programs that either require each sequence be submitted individually, making large-batch analyses difficult to conduct, or only provide limited options for searching off-target candidates (e.g. NCBI-BLAST). We have developed a stand-alone, enhanced RNAi design program that overcomes these shortcomings. We have implemented WU-BLAST, FASTA and SSEARCH homology searches for siRNA candidates to improve gene specific siRNA selection and to identity siRNA candidates that could lead to off-target gene silencing. We also included many new features such as siRNA score calculation and calculation of siRNA internal stability to help select highly potent siRNAs. This program is freely available for academic and commercial use (), and can be installed and run on any Linux machine. Our program automates the search for siRNAs and the resulting data files including a list of siRNA primers with scores and database search results for each siRNA candidate are stored locally for easy retrieval and inspection when needed.  相似文献   

18.
目的:编制切线迭代法的计算程序,提供一种简单的计算方法。方法:使用CASIO?χ-3600 P计算器,利用M、K寄存器输入程序变量,直接按P1键运行程序。结果:第一次输入变量进行运算得出结果后,程序内自动生成全部变量,下一轮计算变量零输入,快速得到X值。结论:切线迭代法的计算程序,解决了烦琐复杂的循环计算问题,满足了平均发展速度计算工作的需要,具有操作简单、运算方便、结果准确的优点。  相似文献   

19.
【目的】高超声速湍流直接数值模拟(DNS)对空间及时间分辨率要求高,计算量非常大。过大的计算量及过长的计算时间是导致DNS难以在工程中被大范围应用的重要原因。为加快计算速度,作者设计并开发了一套CPU/GPU异构系统架构(HSA)下的高性能计算流体力学程序OpenCFD-SCU。【方法】该程序以作者前期开发的高精度有限差分求解器OpenCFD-SC为基础,经GPU系统的移植及优化而得。GPU程序的计算部分使用CUDA编程,确保所有算术运算都在GPU上完成。【结果】利用GPU程序OpenCFD-SCU,进行了来流Mach数6,6°攻角钝锥边界层转捩的直接数值模拟,得到了转捩过程中的时空演化流场。针对这一算例,GPU程序OpenCFD-SCU与CPU程序OpenCFD-SC相比,实现了60倍的加速效果(单GPU卡对单CPU核心),大大加速了DNS计算过程。【结论】未来,相信会有更多高超声速湍流模拟选择在GPU上开展。  相似文献   

20.
A theory of fault-based testing   总被引:1,自引:0,他引:1  
A theory of fault-based program testing is defined and explained. Testing is fault-based when it seeks to demonstrate that prescribed faults are not in a program. It is assumed that a program can only be incorrect in a limited fashion specified by associating alternate expressions with program expressions. Classes of alternate expressions can be infinite. Substituting an alternate expression for a program expression yields an alternate program that is potentially correct. The goal of fault-based testing is to produce a test set that differentiates the program from each of its alternates. A particular form of fault-based testing based on symbolic execution is presented. In symbolic testing, the output from the system is an expression in terms of the input and the symbolic alternative. Equating this with the output from the original program yields a propagation equation whose solutions determine those alternatives which are not differentiated by this test. Since an alternative set can be infinite, it is possible that no finite test differentiates the program from all its alternates. Circumstances are described as to when this can be decided  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号