Sequences

Sequences
复制标题

DOI:
10.1007/978-3-319-13072-9_4
复制
发表时间:
2021-02
期刊:
Introduction to Analysis with Complex Numbers
影响因子:
--
通讯作者:
Jordi Cortadella
Jordi Cortadella
中科院分区:
其他
文献类型:
--
作者:
Jordi Cortadella

文献摘要

被引文献

相似文献

计算机真的很擅长处理大量的信息。他们可以一遍又一遍地重复一项任务,而不会感到无聊。当他们重复一项任务时,他们通常会对类似的数据或对象做同样的事情。将这些对象组织成某种结构是很自然的,这样我们的程序就可以很容易地从一个对象切换到下一个对象。如何将对象添加到序列或集合以及如何从一个项目移动到另一个项目会对我们希望如何组织程序中的数据集合产生一些影响。在本章中,我们将介绍将数据组织成序列的不同方法。我们还将研究如何使用Python来方便地使用序列。Python中的运算符重载使我们可以构建可以通过直观操作进行操作的序列。最后,我们还研究了序列的组织如何影响对其进行运算的计算复杂性。
Computers are really good at dealing with large amounts of information. They can repeat a task over and over again without getting bored. When they repeat a task they are generally doing the same thing to similar data or objects. It is natural to want to organize those objects into some kind of structure so that our program can easily switch from one object to the next. How objects are added to a sequence or collection and how we move from one item to the next has some impact on how we might want to organize the collection of data in a program. In this chapter we look at different ways of organizing data into a sequence. We’ll also examine how to use Python to make working with sequences convenient. Operator overloading in Python lets us build sequences that we can manipulate with intuitive operations. Finally, we also examine how the organization of a sequence affects the computation complexity of operations on it.