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/archive/2011/06/23/2088036.html
總結
以上是生活随笔為你收集整理的Code Reading -chap4的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 读取 android的内存、cpu、流量
- 下一篇: 深开头的四字成语有哪些?