  Petersen and Tenner defined the depth statistic for Coxeter group elements
which, in the symmetric group, can be described in terms of a cost function on
transpositions. We generalize that cost function to the other classical (finite
and affine) Weyl groups, letting the cost of an individual reflection $t$ be
the distance between the integers transposed by $t$ in the combinatorial
representation of the group (\`a la Eriksson and Eriksson). Arbitrary group
elements then have a well-defined cost, obtained by minimizing the sum of the
transposition costs among all factorizations of the element. We show that the
cost of arbitrary elements can be computed directly from the elements
themselves using a simple, intrinsic formula.
