Introduction
In this chapter, we will cover Python's capabilities in graph theory, geometry, and geography.
Graphs are mathematical objects describing relations between items. They are ubiquitous in science and engineering, as they can represent many kinds of real-world relations: friends in a social network, atoms in a molecule, website links, cells in a neural network, neighboring pixels in an image, and so on. Graphs are also classical data structures in computer science. Finally, many domain-specific problems may be re-expressed as graph problems, and then solved with well-known algorithms.
We will also see a few recipes related to geometry and Geographic Information Systems (GIS), which refers to the processing and analysis of any kind of spatial, geographical, or topographical data.
In this introduction, we will give a brief overview of these topics.
Graphs
Mathematically, a graph is defined by a set of vertices or nodes, and a set of edges (two-element subsets of ). Two nodes...