所以,只想直接展开结构,可能会形成无限的递归循环。
As a result, just trying to expand the structure directly leads to infinite recursion loops.
最终结果是一个无限递归循环,FlashPlayer可能会挂起整个应用程序,甚至可能挂起用户的系统。
The end result is an infinite recursive loop, and Flash Player will hang, freezing the entire application and possibly the user's system, too.
让我们来研究一个打印报表的常见循环,了解如何将它转化为一个递归函数。
Let's take a look at a common loop for printing reports and see how it can convert into a recursive function.
实际上,可以认为循环和递归函数是能够相互转换的。
In fact, loops and recursive functions can be considered interchangeable.
一旦检测到循环,就会设置cycle子句中已定义好的适当标记,并停止分支的递归查询过程。
As soon as a cycle is detected the appropriate flag defined in the cycle clause is set and the recursive query process for the branch is stopped.
简言之,NOCYCLE防止递归进入循环。
In short, NOCYCLE prevents the recursion from entering a cycle.
通常情况是函数内包含了过多的循环(不是在循环中执行了过多的内容),太多的递归,或者只不过是太多不相干但又要一起执行的操作。
Usually this means there's too many loops (as opposed to too much happening in a loop), too much recursion, or simply too many different operations being performed.
驱动每个子行的递归步骤,以检测那一步是否会导致循环。
Drive one recursive step for each child row to detect whether that step leads to a cycle.
无论是在c、XSLT中,还是在Scheme中,都应用了使用递归代替循环。
Replacing loops with recursion, whether in c, XSLT, or Scheme, takes some getting used to.
这便是haskell没有while或for循环的原因,我们的替代方案是使用递归。
That's why there are no while loops or for loops in Haskell and instead we many times have to use recursion to declare what something is.
函数式编程中,传统语言中用循环完成的多数任务都可以使用递归来完成。
In functional languages, most tasks that are accomplished with loops in traditional languages are instead accomplished with recursion.
注意,此版本甚至可以在循环自身中使用递归,两次调用循环本身,一次用于对列表左手边的内容进行排序,另一次对列表右手边的内容进行排序。
Notice that this version even makes use of recursiveness in itself, calling itself twice, once to sort the left-hand side of the list, and once again to sort the right-hand side of the list.
无论是太多的循环、递归还是其他的什么,你现在应该知道如果处理类似的情况。
Whether there be too many loops, too much recursion, or just plain too much going on, you now know how to deal with each.
当我们将循环转化为递归函数时,递归调用是函数所做的最后一件事情。
When we converted our loop to a recursive function, the recursive call was the last thing that the function did.
因此,只有在非常复杂的大量使用循环和递归调用的应用程序中,才需要考虑这种潜在的影响。
Therefore, the potential impact is a factor only in complex applications where iterations and recursive invocations are heavily used.
在表1中了解循环的特性,看它们可以如何与递归函数的特性相对比。
Take a look at the properties of loops and see how they compare with those of recursive functions in Table 1.
注意,在循环的结尾处,我用一个比上次大1的参数递归地调用同一个函数,以实现循环的迭代。
Note at the end of the loop that I recursively call the same function with an argument that is one greater than the previous, implementing the iteration of the loop.
通常,函数语言会避开while循环,因为while实现的大多数操作都可以使用递归来完成。
Normally, functional languages eschew the while loop, because most of what while does can be done instead with recursion.
而在Erlang中不需要使用循环,因为尾递归函数会被自动优化在固定的空间中运行。
In Erlang there is no need for loops because tail recursive functions are transparently optimized to run in constant space.
根据Wikipedia:递归(拉丁语recurrere->currere =run和re =return)是以自相似性的方式循环某些项的过程。
According to Wikipedia: Recursion (lat. recurrere -> currere = run and re = return) is the process of repeating items in a self-similar way.
分别用循环映射法和简化递归对剖法实现了分子动力学的并行计算。
Cyclic mapping and reduction recursive bisection method were used to parallel the molecular dynamics.
给出了循环几乎可分解的循环有向三元系的一些直接构造和递归构造。
The direct and recursive constructions for a cyclically almost resolvable cyclic directed triple system are given.
在这种递归模式中,两个函数互相调用对方,形成一个无限循环。
In this recursion pattern, two functions each call the other, such that an infinite loop is formed.
递归是比迭代循环更有力的算法。
对使用形式化方法及循环不变式开发新策略开发非递归算法作了较深入的实践和探讨。
The paper contributes to developing non-recursive algorithm using formal method and new strategy of developing loop invariant.
基于现有循环不变式开发技术中的递归定义思想,提出了开发复杂递归问题循环不变式的两种新策略;
Based on recursive definition idea in existing technique of developing loop invariants, two new strategies for developing loop invariants on complicated recursive problems are presented.
对于背包问题这样一个经典的递归问题,发现了它的不需栈支持的循环解法,并由此说明其存在并行。
For knapsack problem (which is a classical recursion problem), find its round solution which need not stack to support, then prove it exists parallel solutio.
确保您没有无限循环或无限递归。
Make sure you do not have an infinite loop or infinite recursion.
对于背包问题这样一个经典的递归问题,发现了它的不需栈支持的循环解法,并由此说明其存在并行解。
For knapsack problem (which is a classical recursion problem), find its round solution which need not stack to support, then prove it exists parallel solution.
对于背包问题这样一个经典的递归问题,发现了它的不需栈支持的循环解法,并由此说明其存在并行解。
For knapsack problem (which is a classical recursion problem), find its round solution which need not stack to support, then prove it exists parallel solution.
应用推荐