首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 218 毫秒
1.
本文主要讨论基于Doc/View结构的MFC程序中类之间变量的相访问问题。利用全局API函数、各个类的成员函数、静态(static)变量和外部(extern)变量,可以很方便地实现类之间变量的互相访问。  相似文献   

2.
JAVA中内部类的使用主要是为方便实现图形用户界面中的事件处理,利用内部类可以存取所在类的成员变量和调用其成员方法这一特性,会简化程序的编写.为了论证这一主题,文章从内部类的内部机理出发,通过具体实例,证明了"巧妙地使用内部类可以大大简化程序的编写"这一结论是成立的.文中还简要地介绍了JAVA中内部类的特点和使用方法.  相似文献   

3.
Java语言入门     
在本讲中,将介绍Java的使用、Java的包和类库以及Java程序出错异常的处理。 一、类的使用 1.null、this和super Java语言中每个类均有3个特殊变量:null、this和super,其作用分别介绍如下: ●null为“空”变量,用来表示一个不存在实例的  相似文献   

4.
程序的执行体现为数据在变量中的流动。对C/C++源代码中变量定义使用情况进行分析,针对变量未赋值就使用、变量重复赋值和变量定义后未使用三种数据流异常情况,使用程序阅读自动机,把程序转换为变量状态机,使用ALCCTL时序逻辑和模型检验工具,验证程序是否满足定义的可信模式。提出了新的静态查找变量使用故障的方法。该方法已应用于面向故障的软件测试系统中。  相似文献   

5.
通过抽象程序证明复杂具体程序   总被引:1,自引:1,他引:0  
李彬  汤震浩  翟娟  赵建华 《软件学报》2017,28(4):786-803
本文描述了证明抽象程序和具体程序满足一致性关系的方法.抽象程序使用抽象数据结构(ADTs)如set、list、map及其上的操作.具体程序使用类C语言中的类型.抽象程序和具体程序一致性证明需要用户给出抽象变量和具体变量的关系,抽象程序程序点和具体程序程序点的对应关系.基于对应关系,抽象程序和具体程序一致性证明可以分解,从而容易并可能自动证明.  相似文献   

6.
对仿真程序原始任务图的聚类运算是实现仿真程序并行化的关键。在研制面向仿真程序自动并行化系统AFPS的过程中,提出了一个基于状态变量一阶微分的并行任务聚类算法。使用结果表明,该算法可以最大限度地保证各处理机结点的负载均衡,减少通信次数,且易于实现通信变量的自动确定。  相似文献   

7.
本文介绍了C#中结构的不同数据成员的处理,结构变量的使用,结构在参数传递中的应用,结构和类的区别。  相似文献   

8.
JAVA中利用内部类简化程序的编写   总被引:2,自引:2,他引:2  
尉哲明  郝建文 《微机发展》2003,13(3):41-44,87
JAVA中内部类的使用主要是为方便实现图形用户界面中的事件处理,利用内部类可以存取所在类的成员变量和调用其成员方法这一特性,会简化程序的编写,为了论证这一主题。文章从内部类的内部机理出发,通过具体实例,证明了“巧妙地使用内部类可以大大简化程序的编写”这一结论是成立的,文中还简要地介绍了JAVA中内部类的特点和使用方法。  相似文献   

9.
在数组处理过程中,经常利用数组变量,合理设计数组的结构,会使程序的运行速度大大提高,从而提高程序效率。凡是编写过应用程序的人,大概都使用过数组,而对数组最常用的操作莫过于互换某二行(列)的内容(如:排序、清除某一行(列)的内容等),而对于结构变量,不是每个人都会去考虑,除非相关的一组数据的类型不一致时,才会使用,其实一组相关数据的类型一致时,也可以使用结构类型,而且其优越性远比使用一般的数组好。卞面用两种方法  相似文献   

10.
在程序设计中,利用Authorware的交互特性,巧妙地利用图标并适当地使用系统变量及自定义变量,就能开发出程序简单和动态交互性能极强练习课件。  相似文献   

11.
在计算顾客满意度模型时, 普遍使用结构方程模型来求解复杂的多维度关系. 而针对结构方程模型的计算, 偏最小二乘(PLS)有效地解决了模型分析过程中大量潜变量无法直接采样获得的问题, 建立了显变量与潜变量之间的关系, 增强了模型的直观性和通用性. 为了提升偏最小二乘算法的效率, 在针对结构方程模型的计算中, 利用多线程将模型计算并行化, 以提升计算效率. 探讨了基于Java多线程的顾客满意度PLS路径模型的优化算法, 并在多核计算机上实验证明, 多线程化的PLS路径模型能够显著提升计算速度.  相似文献   

12.
We investigate the parameterized computational complexity of the satisfiability problem for modal logic and attempt to pinpoint relevant structural parameters which cause the problem??s combinatorial explosion, beyond the number of propositional variables v. To this end we study the modality depth, a natural measure which has appeared in the literature, and show that, even though modal satisfiability parameterized by v and the modality depth is FPT, the running time??s dependence on the parameters is a tower of exponentials (unless P = NP). To overcome this limitation we propose possible alternative parameters, namely diamond dimension and modal width. We show fixed-parameter tractability results using these measures where the exponential dependence on the parameters is much milder (doubly and singly exponential respectively) than in the case of modality depth thus leading to FPT algorithms for modal satisfiability with much more reasonable running times. We also give lower bound arguments which prove that our algorithms cannot be improved significantly unless the Exponential Time Hypothesis fails.  相似文献   

13.
In this article we address the general problem of monitoring the process cross- and auto-correlation structure through the incorporation of information about its internal structure in a pre-processing stage, where sensitivity enhancing transformations are applied to collected data. We have found out that the sensitivity of the monitoring statistics based on partial or marginal correlations in detecting structural changes is directly related to the nominal levels of the correlation coefficients during normal operation conditions (NOC). The highest sensitivities are obtained when the process variables involved are uncorrelated, a situation that is hardly met in practice. However, not all transformations perform equally well in producing uncorrelated transformed variables with enhanced detection sensitivities. The most successful ones are based on the incorporation of the natural relationships connecting the process variables. In this context, a set of sensitivity enhancing transformations are proposed, which are based on a network reconstruction algorithm. These new transformations make use of fine structural information of the variables connectivity and therefore are able to improve the detection capability to local changes in correlation, leading to better performances when compared to current marginal-based methods, namely those based on latent variables models, such as PCA or PLS. Moreover, a novel monitoring statistic for the transformed variables variance proved to be very useful in the detection of structural changes resulting from model mismatch. This statistic allows for the detection of multiple structural changes within the same monitoring scheme and with higher detection performances when compared to the current methods.  相似文献   

14.
提高电力负荷预测精度有利于电力部门的安全生产,有利于合理安排电网运行方式和机组的检修计划,有利于系统的合理规划和经济运行。为了提高短期负荷预测的精度,把自相关函数的概念应用到反向传播(Back Propogation,BP)神经网络输入变量选择中,通过MATLAB仿真软件建立负荷预测模型。最后对某电力系统1d的负荷进行预测,仿真结果验证了该模型的可行性和有效性。  相似文献   

15.
单机调度问题对偶集结迭代算法   总被引:1,自引:0,他引:1  
具有到达时间约束、目标为最小化加权完工时间之和的单机调度问题是一个典型的NP-hard问题,采用时间下标建模的线性规划松弛方法可提供一个很强的下界,但优化求解存在维数困难.为此,本文提出了一种对偶集结优化策略,通过选择一个衰减集结矩阵集结对偶乘子变量,利用对偶理论获得模型的约束集结,从而降低计算复杂度.同时分析了集结模型的结构特性,并提出一种迭代算法来改善下界.仿真结果表明对偶集结迭代算法能够减少计算时间,同时改善下界性能,适用于大规模调度问题.  相似文献   

16.
Backtracking and random constraint satisfaction   总被引:2,自引:0,他引:2  
The average running time used by backtracking on random constraint satisfaction problems is studied. This time is polynomial when the ratio of constraints to variables is large, and it is exponential when the ratio is small. When the number of variables goes to infinity, whether the average time is exponential or polynomial depends on the number of variables per constraint, the number of values per variable, and the probability that a random setting of variables satisfies a constraint. A method for computing the curve that separates polynomial from exponential time and several methods for approximating the curve are given. The version of backtracking studied finds all solutions to a problem, so the running time is exponential when the number of solutions per problem is exponential. For small values of the probability, the curve that separates exponential and polynomial average running time coincides with the curve that separates an exponential average number of solutions from a polynomial number. For larger probabilities the two curves diverge. Random problems similar to those that arise in understanding line drawings with shadows require a time that is mildly exponential when they are solved by simple backtracking. Slightly more sophisticated algorithms (such as constraint propagation combined with backtracking) should be able to solve these rapidly. This revised version was published online in June 2006 with corrections to the Cover Date.  相似文献   

17.
变计时过程ö变迁网模型及其应用研究   总被引:1,自引:0,他引:1  
基于过程运行的离散标识(逻辑变量)和剩余时间连续标识(时间变量),提出一种新的混合标识过程/变迁网——变计时过程/变迁网模型.基于该模型,混杂动力学系统离散事件的实时监控、连续子过程的实时调度等问题可得到有效解决.  相似文献   

18.
分析了带回热器的微型燃机运行时各变量之间的耦合关系,针对微型燃机运行时参数多变、过程复杂的特点,提出了应用解耦控制算法控制燃机运行的思想;把BP神经网络应用在解耦控制中,结合传统的PID控制,提出了一种新的置解耦网络于调节器之前的BP神经网络解耦控制算法.仿真及实验结果表明此种控制算法具有良好的控制效果.  相似文献   

19.
Progress in the field of structural optimization naturally leads to an increasing number of structural models and optimization algorithms that need to be considered for design. Software architecture is of central importance in the ability to account for the complex links tying new structural models and optimizers. An object-oriented programming pattern for interfacing simulation and optimization codes is described in this article. The concepts of optimization variable, criteria, optimizers and simulation environment are the building blocks of the pattern. The resulting interface is logical, flexible and extensive. It encompasses constrained single or multiple objective formulations with continuous, discrete or mixed design variables. Applications are given for composite laminate design.  相似文献   

20.
In this article we develop a model for a very flexible link that incorporates distributed controls and can be caused to achieve large transverse deflections as part of an overall control scheme. This ability opens the possibility of combining structural and position control actuator functions within a single lightweight physical device (with inextensible centerline). Emphasis is placed on presenting a basic model for this situation in terms and variables that are useful for integration with the conventions of conventional rigid-body robot dynamics.  相似文献   

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

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