访问者模式是一种处理任意数据结构的简单技术。
The visitor pattern is a simple technique to process arbitrary data structures.
如何与访问者模式处理收藏?
实现不生成结果值的表达式的访问者模式。
Implements the visitor pattern for expressions that do not produce a result value.
问题在于,我们能否在不使用递归的前提下实现访问者模式?
The question is, can we implement the Visitor pattern without recursion?
无论使用哪种语言,访问者模式都是操作树形数据的一种可靠工具。
In each case, I've found that the Visitor pattern is a reliable tool for manipulating trees of data.
因此,在Jam 中,访问者模式不能和mixin 一起使用。
Thus, in Jam, the visitor pattern can't be used with mixins.
就访问者模式而言,本文未加详述的另一各方面就是迭代顺序。
Another aspect of the Visitor pattern not closely examined here is iteration order.
访问者模式将创建一个场景,简化对现有数据类型集合添加操作(新访问者)的过程。
The Visitor pattern creates a scenario where adding operations (new visitors) over the set of existing data types is easy.
这将作为一种有用的基本用例,类似于经典访问者模式中的基本 Visitor类。
This serves as a useful base case, similar to a base Visitor class in the classic Visitor pattern.
访问者模式往往用于将数据结构(本例中是树)与通过数据结构操作的算法分离开来。
The Visitor pattern is often used to separate a data structure (the tree, in this case) from the algorithms that operate over the data structure.
请考虑访问者模式,其中用for方法为复合层次结构中的每个类都定义了访问者类。
Consider the visitor pattern in which a visitor class is defined with a for method for each class in a composite hierarchy.
这篇文章仅仅是涉及了在访问者模式中使用zippers的一些浅显问题;目的在于激发您进一步探索的兴趣。
This article has just scratched the surface of using zippers in the Visitor pattern; the point of it is to whet your appetite for further exploration.
然而,通过访问者添加新数据类型(类)较为困难,因为访问者模式要求所有具体类型都具有一个visit方法。
Adding new data types (classes) with visitors is difficult, however, as the visitor pattern requires a visit method for all concrete types.
利用Clojure的函数式编程工具来实现访问者模式是消除这种附带的复杂性的一种方法,而且仍然是在JVM上编程。
Leveraging Clojure's functional programming tools to implement the Visitor pattern is one way to get around this incidental complexity, while still programming on the JVM.
无论你的网络业务是怎样建立和运行的,通过注册用户,网站访问者,网站统计,营销模式等等,你都已经拥有了大量的信息。
No matter how your online business may be setup and running, you're sitting on a massive amount of information, through registered users, website visitors, site statistics, sales patterns and so on.
您可以轻松集成模式匹配库与树访问者,使访问者能够利用树模型。
It is not hard to integrate a pattern-matching library with the tree visitor to get to a point where visitors can leverage tree patterns.
另外一种可用于DEBA架构的设计模式是Visitor(访问者)模式,将操作外部化,可以对其他对象、对象组或者对象结构执行这些操作。
Another design pattern that lends itself well to DEBA is the Visitor pattern, which externalizes an operation that will be performed on another object, a group of objects, or a structure of objects.
给出一种新的相似模式聚类算法,能高效地得到访问者对象在整个或者部分属性空间的相似访问行为模式。
The paper proposes a novel similar pattern clustering algorithm that can discover the pattern that exhibits a coherent pattern on a subset of dimensions.
给出一种新的相似模式聚类算法,能高效地得到访问者对象在整个或者部分属性空间的相似访问行为模式。
The paper proposes a novel similar pattern clustering algorithm that can discover the pattern that exhibits a coherent pattern on a subset of dimensions.
应用推荐