网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Loop invariant
释义

Loop invariant

中文百科

循环不变量

在计算机科学中,循环不变性(loop invariant,或“循环不变量”),是一组在循环体内、每次迭代均保持为真的性质,通常被用来证明程序或伪码的正确性(有时但较少情况下用以证明算法的正确性)。简单说来,“循环不变性”是指在循环开始和循环中,每一次迭代时为真的性质。这意味着,一个正确的循环体,在循环结束时“循环不变性”和“循环终止条件”必须同时成立。

由于循环和递归的相通,证明带有不变性的循环的部分正确性和证明通过归纳的递归进程的正确性极其相似。

英语百科

Loop invariant 循环不变量

In computer science, a loop invariant is a property of a program loop that holds before (and after) each iteration. It is a logical assertion, sometimes checked within in the code by an assertion call. Knowing its invariant(s) is essential in understanding the effect of a loop.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/23 11:52:17