11.1 Overview
How the Algorithms Work一节
“Each generic algorithm is implemented independently of the individual container types. The algorithms are also largely, but not completely, independent of the types of the elements that the container holds. To see how the algorithms work, let's look a bit more closely at find. Its job is to find a particular element in an unsorted collection of elements. Conceptually the steps thatfind must take include:
“每个泛型算法的实现都独立于单独的容器。这些算法还是大而不全的,并且不依赖于容器存储的元素类型。为了知道算法如何工作,让我们深入了解find 操作。该操作的任务是在一个未排序的元素集合中查找特定的元素。从概念上看,find 必须包含以下步骤:”
其中
“The algorithms are also largely, but not completely, independent of the types of the elements that the container holds. ”觉得原书翻译有错误,应为:这些算法基本独立于各种容器持有的不同元素类型。其中“largely, but not completely”的意思是很多算法都是与容器具体元素类型无关的,但并不是所有算法都这样,这个意思用汉语来表达,就是“基本”这个词所表达的意思。原译为“大而不全”非常不妥。
立此存照。
11.5. Container-Specific Algorithms
Unlike the corresponding generic algorithms, the list-specific operations do add and remove elements.
“与对应的泛型算法不同,list 容器特有的操作能添加和删除元素。”
其中
”能“ 表示一种能力(暗含可选择),此处应翻译成”会“。