liveBook · Manning

Edge weight

An edge weight is a quantitative value associated with a graph edge that represents a property of the connection, such as its strength, cost, or distance.

How 3 Manning books explain it

Grokking Algorithms, Second Edition

An edge weight is a numerical value assigned to a graph edge to represent traversal cost, distance, time, or another quantity.

How it is used
Represents the cost of each graph connection so routes can be compared by total cost rather than segment count.
How deep it goes
Defines weights and walks through route totals, then shows how code stores and adds them.
Examples
Uses travel times between nodes and the money required for successive trades toward a piano.
What you can do after
Apply it via Dijkstra’s algorithm to compare nonnegative-weight routes and update costs when a cheaper path appears.

Read how Grokking Algorithms, Second Edition explains edge weight →

Advanced Algorithms and Data Structures

A weight is a numerical value associated with a graph edge to represent its cost, distance, or other measure.

How it is used
Measures graph-route cost so shortest-path algorithms can optimize distance, time, or another domain-specific objective.
How deep it goes
Defines path totals and priority changes, then connects them to priority-queue choices and Dijkstra running times.
Examples
Uses intersection maps, competing routes, road distances, and changing travel times caused by traffic or closures.
What you can do after
Apply it via Dijkstra’s algorithm to compare routes by accumulated cost and select an appropriate priority-queue implementation.

Read how Advanced Algorithms and Data Structures explains edge weight →

D3.js in Action, Third Edition

An edge weight is a numeric value associated with a network edge that represents the strength or quantity of its connection.

How it is used
Uses numeric edge values to prepare network links and communicate relationship strength in visualizations.
How deep it goes
Explains storage, bidirectional matrix preparation, opacity mapping, legends, and tooltips without developing broader network analysis.
Examples
Demonstrates shared-scene counts among Lady Capulet, the Nurse, Juliet Capulet, and Romeo Montague.
What you can do after
Apply it via D3.js to encode connection strength with color, opacity, legends, and interactive tooltips.

Read how D3.js in Action, Third Edition explains edge weight →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.