Skip to Content
算法技术手册(原书第2 版)
book

算法技术手册(原书第2 版)

by George T.Heineman, Gary Pollice, Stanley Selkow
August 2017
Intermediate to advanced
360 pages
8h 35m
Chinese
China Machine Press
Content preview from 算法技术手册(原书第2 版)
38
3
3.1.2 输入 / 输出
描述输入
/
输出数据的格式和结构。
3.1.3 使用环境
使用环境一节描述了算法的最佳使用时机和场所还有成功实现算法所需要关注的一系
列要点。尤其是问题的某些关键特性会决定算法的选择。
3.1.4 决方案
算法以及一段可运行且附有注释的代码。所有的代码都可以在代码库中找到。
3.1.5 算法分析
对算法的大致分析,其中包括性能数据以及其他帮助理解算法行为的数据。这部分并不
是想“证明”算法理论上的性能,而是帮助读者理解为什么算法会这样做。我们同样提
供了一些参考文献,这些文献里面包含了大量的数学定理和证明过程,用于帮助读者理
解为什么算法的实际运行结果与理论相一致。
3.1.6 衍生算法
阐述了算法的衍生版本或者完全不同的替代算法。
3.2 伪代码模板的格式
书中的每个算法都可以用主流的编程语言实现,例如
Python
C
C++
Java
由于
有些读者不熟悉这些语言,我们会先用伪代码描述算法,并辅以一个小例子来解释运行
过程。
下面的例子给出了描述算法性能的模板,它包含算法名称,以及第
2
章中所述的算法的
三个性能指标(最好情况、平均情况和最坏情况)。
伪代码的描述应当尽可能得简洁。其中关键字和函数名称用粗体字表示,所有变量采用
小写字母,数组名称大写,元素采用
A
[
i
]
这样的表示形式。条件语句和循环语句需要缩进。
在阅读代码实现之前最好参考一下算法的概述。在算法的概述之后,我们会提供一个
简单的例子来更好地解释算法的运行过程(见图
3-1
)。为了生动地表示算法的运行过程, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

Aurélien Géron
Go语言编程

Go语言编程

威廉·肯尼迪

Publisher Resources

ISBN: 9787111562221