Code Reading chap4

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+  

+                    Chapter4: C Data Structures

+

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

67.   Read explicit data structure operations in terms of the underlying abstract data class.(P96)

        依据显式数据结构背后的抽象数据类去阅读该显式数据结构操作。

---------------------------------------------------

68.   Vectors are typically realized in C by using the built-in array type without attempting to abstract

        the properties of the   vector from the underlying implementation.(P96)

        向量典型的被C以这样的方式使用:使用内置数组类型,且不试图去对来自基底的实现的该向量属性抽象化。

---------------------------------------------------

69.   An Array of N elements is completely processed by the sequence for ( i=0; i<N; i++);all other variations 

       should raise your defense.(P96)

---------------------------------------------------

70.   The expression sizeof(x) always yields the correct number of bytes for procession an array

        x (not a pointer) with memset or memcpy. (p97)

       表达式sizeof(x)总是产生就处理一带有memset 或memcpy的数组X(不是一个指针)而言之正确的字节数。

---------------------------------------------------

71.   Ranges are typically represented by using the first element of the rage and the first beyond it.(P100)

        范围典型的会这样去表述:用范围的第一个元素以及第一个超越范围大小的元素。

---------------------------------------------------

72.   The number of elements in an asymmetric range equals the difference between the upper and

        the lower bounds.(P100)

       在一个非对称范围内的元素数目等价于上下界之间的数目。

---------------------------------------------------

73.   When the upper bound of an asymmetric range equals the lower bound, the range is empty.(P100)

        当非对称范围的上界等于其下界时,该范围就是空。

---------------------------------------------------

74.   The lower bound in an asymmetric range represents the first occupied element; the upper bound,

        the first free one.(P100)

        非对称范围的下界表示了第一个占据位置了的元素;而上界,表示了第一个自由的元素。 

---------------------------------------------------

75.  Arrays of structures often represent tables consisting of records and fields.(P101)

     结构体的数组常常表示由记录和字段组成的表。

---------------------------------------------------

76.  Pointers to structures often represent a cursor for accessing the underlying records and fields.(P101)

      指向结构体的指针常常表示了一个游标,该游标用于存取背后的记录以及字段。

---------------------------------------------------

77.  Dynamically allocated matrices are stored as pointers to array columns or as pointers to element pointers;

      Both types are accessed as two-dimensional arryas.(P103)

     动态分配矩阵被存储成指向列数组的指针或者指向元素指针的指针;两种类型都可以通过二维数组来操控。

---------------------------------------------------

78.  Dynamically allocated matrices stored as flat arrays address their elements using custom access function. (P104)

      动态分配矩阵存储成,使用通常的存取函数方式去声明它们的元素地址之平面数组。

---------------------------------------------------

79. An abstract data type provides a measure of confidence regarding the way the underlying implementation

     elements will be used(or abused).(p106)

     一个抽象数据类型提供了一种“充份考虑到潜在的实现元素会被使用或者滥用”的情况。

---------------------------------------------------

80.  Array are used for organizing lookup tables keyed by sequential integers starting from 0. (P111)

      数组常常用于组织查找那些键由从0开始的连续整数组成的表。       

---------------------------------------------------

81.  Arrays are often used to efficiently encoded control structures, thus simplifying a program's logic.(P111)

      数组常常用于有效编码控制结构, 从而简化程序逻辑。

---------------------------------------------------

82.  Array are used to associate data with code by storing in each position a data element and a pointer

      to the element's processing function.(P112)

      数组用于把数据关联到这样的代码:在各个位置存一个数据元素,以及一个指到该元素的处理函数之指针。

---------------------------------------------------

83.   Arrays can control a program's operation by storing data or code used by abstract or virtual

       machines implemented within that program. (P113)

       数组可以用存储数据或者,用于抽象或者虚拟机实现的代码,去控制一个程序的操作。

---------------------------------------------------

84. Read the expression sizeof(x)/sizeof(x[0]) as the number of elements of the array x.(P113)

     将表达式sizeof(x)/sizeof(x[0]) 读成 数组x的元素数目。

---------------------------------------------------

85.  A structure with an element titled next pointer to itself typically defineds a node of a a singly linked list.(P118)

      一个结构体有这样一个元素,该元素将next 指针指向它自己,这就典型的定义了一个有单链表的节点。

---------------------------------------------------

86. A parameter(for example, globle, static, or heap allocated) poiter to a list node often represents

     the list head.(P118)

     一指向一个列节点的参数(如,全局参数, 静态参数 或者堆分配参数)常常表示了该列的头。

---------------------------------------------------

87. A structure containning next and prev pointers to itself is probably a node of a doubly linked list.(P121)

    一个包含了 next 和prev 指针指向自身的结构体, 很可能是一个双向链表的一个节点。

---------------------------------------------------

88. Following complicated data structure pointer operations by drawing elements as boxes and pointers

     as arrows.(P 122)

     当复杂数据结构指针操作出现时候,通常跟随其后的是 将元素画成盒子,将指针画成箭头。

---------------------------------------------------

89. Recursive data structures are often processed by using recursive algorithms. (P126)

     递归数据结构常常由递归算法处理(译注:言下之意,递归数据结构不一定用于递归算法处理?)。

---------------------------------------------------

90.  Nontrivial data structures manipulation algorithms are typically parameterized using  a function

      or template argument. (P126)

     非平凡数据结构操作算法典型的使用一个函数,或者模板参数来被参数化。

---------------------------------------------------

91.  Graph nodes are stored sequentially in arrays, linked in lists, or linked through the graph edges. (P126)

      图节点是顺序的存储在数组中,或者是链接的方式存储在列表中, 或者通过图的边进行链接。

---------------------------------------------------      

92.  The edges of a graph are typically represented either implicitly through pointers or explicitly as seperate structures.(P134)

      图的边典型的被内在含蓄的表现成通过指针的形式,要么被明确的表现成分离的结构。

---------------------------------------------------      

93. Graph edges are often stored as dynamically allocated arrays or linked lists, both anchored at a graph's nodes.(P137)

     图的边常常存储成动态分配的数组或者链表, 这两者都会固定住一张图的节点。

---------------------------------------------------      

94. In a nondirectional graph the data representation should treat both nodes as equal, and processing code should

      similarly not discriminate edges based on their direction. (P193)

     在一个非有向图中,其数据表示应当对所有的节点一致对待,并且处理代码类似的,不应当对边有基于这些边的方向之不同区别对待。

---------------------------------------------------     

95.  On nonconnected graphs, traveral code should be coded so as to bridge isolated subgraphs.(P139)

       在非可达图中,遍历的代码应当被编码成可以在到分离的子图之间建起桥梁的样子。

---------------------------------------------------     

96. When dealing with graphs that contain cycles, traversal code should be coded so as to avoid looping

      when following a graoh cycle.(P139)

     当处理的图含有环的时候,便利的代码应当被编码成当进入该图的环时,避免循环的样子。

---------------------------------------------------  

97. Inside complicated graph structures may hide other, separate structures. (P140)   

     复杂图结构中可能内置隐藏了其它独立的结构。

+++++++++++++++++++++++++end of chap4 ++++++++++++++++++++++++++++++++

原文地址:https://www.cnblogs.com/parsifal/p/2088036.html