它以类为基础,并根据类的层次结构和继承关系用链表来构造规则库。
On the basis of class and in accordance with the level structure and the inheritance relation of class, a rule base is constructed by using linked lists.
所以,要构建一个非阻塞的链表、树或哈希表,需要找到一种方式,可以用CAS更新多个指针,同时不会让数据结构处于不一致的状态。
So to construct a nonblocking linked list, tree, or hash table, we need to find a way to update multiple Pointers with CAS without leaving the data structure in an inconsistent state.
一开始看来,用这种方法表示一个空链表使代码简单。
It may at first appear that representing empty lists in this way makes the code simpler.
如果只有一个到这个页的映射,那么可以用一个叫做“direct”的指针来代替链表。
If there is only a single mapping to the page, then a single pointer called "direct" can be used instead of a linked list.
另外,任何阻断我们的链表以及忽略检查空例的代码将返回一个NoSuchElementException,而不是那些没什么用的空指针异常。
Additionally, any code that traverses our lists and forgets to check for the empty case will get a NoSuchElementException, as opposed to the much-less-helpful null-pointer exception.
有时简单的生成器可以用简洁的方式调用,就像不带中括号的链表推导式。
Some simple generators can be coded succinctly as expressions using a syntax similar to list comprehensions but with parentheses instead of brackets.
在Linuxkernel中,所有的进程都是用双链表表示的,双链表带的数据是task_struct. kernel保存一个current指针,指向当前系统中执行的进程。
Within the Linux kernel, all active processes are represented using a doubly linked list of task_struct. The kernel maintains a pointer-current-to the process currently executing on the system.
用双向链表实现了存储数据的功能。 使用了两个链表,分别存储编号对应的幻灯片的两个点对应的坐标,以及序号对应的点的坐标。
Using the two lists, slides are stored corresponding to the number corresponding to the coordinates of the two points, and the number of coordinates of the corresponding point.
用双向链表实现了存储数据的功能。 使用了两个链表,分别存储编号对应的幻灯片的两个点对应的坐标,以及序号对应的点的坐标。
Using the two lists, slides are stored corresponding to the number corresponding to the coordinates of the two points, and the number of coordinates of the corresponding point.
应用推荐