Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Network Science with Python and NetworkX Quick Start Guide

You're reading from  Network Science with Python and NetworkX Quick Start Guide

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789955316
Pages 190 pages
Edition 1st Edition
Languages
Author (1):
Edward L. Platt Edward L. Platt
Profile icon Edward L. Platt

Table of Contents (15) Chapters

Preface What is a Network? Working with Networks in NetworkX From Data to Networks Affiliation Networks The Small Scale - Nodes and Centrality The Big Picture - Describing Networks In-Between - Communities Social Networks and Going Viral Simulation and Analysis Networks in Space and Time Visualization Conclusion Other Books You May Enjoy Appendix

Adjacency matrices

A matrix is a way of describing pairwise relationships. A matrix looks like a grid of numbers, as in the following example:

┌           ┐
│ 0 1 42 │
│ 0.5 -3 1 │
└ ┘

The preceding matrix contains six entries, organized in two rows and three columns. A matrix can have any number of rows or columns, but they are always rectangular. A matrix with two rows and three columns is described as a 2 x 3 matrix. If the entire matrix is called A, then the element at row i and column j is called Ai,j. So, in the preceding example, A2,1 = 0.5.

One way to represent a graph as a matrix is to place the weight of each edge in one element of the matrix (or a zero if there is no edge). So, an edge from v3, to v1 with a weight of 37 would be represented by A3,1 = 37, meaning the third row has a 37 in the first column...

lock icon The rest of the chapter is locked
arrow left Previous Chapter
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}