  We study the concept of the continuous mean distance of a weighted graph. For
connected unweighted graphs, the mean distance can be defined as the arithmetic
mean of the distances between all pairs of vertices. This parameter provides a
natural measure of the compactness of the graph, and has been intensively
studied, together with several variants, including its version for weighted
graphs. The continuous analog of the (discrete) mean distance is the mean of
the distances between all pairs of points on the edges of the graph. Despite
being a very natural generalization, to the best of our knowledge this concept
has been barely studied, since the jump from discrete to continuous implies
having to deal with an infinite number of distances, something that increases
the difficulty of the parameter. In this paper we show that the continuous mean
distance of a weighted graph can be computed in time quadratic in the number of
edges, by two different methods that apply fundamental concepts in discrete
algorithms and computational geometry. We also present structural results that
allow a faster computation of this continuous parameter for several classes of
weighted graphs. Finally, we study the relation between the (discrete) mean
distance and its continuous counterpart, mainly focusing on the relevant
question of the convergence when iteratively subdividing the edges of the
weighted graph.
