An embedding is an ordered collection of numerical components representing a quantity or point in a mathematical space. The demonstrated weighted-graph design offers a related implementation pattern: a generic numerical type can be compared and added when algorithms need to rank or total values. section 4.3
The adjacent weighted-value pattern requires:
- Comparison, so values or weighted edges can be ordered. section 4.3
- Addition, so multiple values can form a combined weight. section 4.3
Numerical values in a weighted graph
A weighted edge can store a generic weight W, such as the distance between two cities. A weighted graph can then report neighbor-and-weight pairs, while algorithms compare individual weights and add them into path or tree totals.














































