103
     =ˆÖÕÛ474ÔÅØ Ú    =‹      ­“Qo›0€ßû+n~Ø[¸B4µ†©‘-M¢„ªš¦©2Ø«`#ã6Ký djZ%Z'M< æóÝ}w˜~ˆãøûr_ã›,o¿Ì¦c =Ä;oŒÅQ÷aèôˆ“9’[[]"n·[gë9Úd¯0·e1ÄÚ™Z‡[NÂÚ®…@sÁxsj¥-D8U\ü½Ô�¶–\±�	–ZiÌXŠë]mEéÜ‰ÄY±gmÐuúíuï’�÷É1î�†Âó)v›xHBÍwmîÁÍÓ„Û°dŸ®}4!µ9<±Bf* VW$¤²Ì 6i@P¦ZÕ˜L=8™Ü`…È�éxñ³áÐæíî�2È�Øäó8˜_-‚kÎY)(²ÓÌMÇÌXm¡Ô\n¤àgáu¯åóù€QÇD¢N�¬¬ÔêÅFñX5ÕE]±ÆÕorsLuÿ[7XúªËëÕdGÓU×Þ†x©î½S#á’¡,DÒˆÔj³;(tñ>ª¤®®þ¼Â¡@#³Ü’ 'É°zTJoÕ±XÓ´“JokwxQ4:±z¬ð¦f·ïú½¾ßs]p—žp¾�—{ç`ñðËSÜ,ŠÝ¡þ Ìˆ´7    Y   ?ˆl–Ãa¾”êh¥2 ¸&®6â˜´o�þC+R¬Ü¤’¸Æ ùÝƒxoÜ_‹I|¥�+ýÿ¹ä³a–äY>” ”¾R( 	ÅÕÁà^S�ÿÛ O    ?// (C) Copyright Andrew Sutton 2007
//
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0 (See accompanying file
// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_GRAPH_GEODESIC_DISTANCE_HPP
#define BOOST_GRAPH_GEODESIC_DISTANCE_HPP

#include <boost/graph/detail/geodesic.hpp>
#include <boost/graph/exterior_property.hpp>
#include <boost/concept/assert.hpp>

namespace boost
{
template < typename Graph, typename DistanceType, typename ResultType,
    typename Divides = std::divides< ResultType > >
struct mean_geodesic_measure
: public geodesic_measure< Graph, DistanceType, ResultType >
{
    typedef geodesic_measure< Graph, DistanceType, ResultType > base_type;
    typedef typename base_type::distance_type distance_type;
    typedef typename base_type::result_type result_type;

    result_type operator()(distance_type d, const Graph& g)
    {
        BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
        BOOST_CONCEPT_ASSERT((NumericValueConcept< DistanceType >));
        BOOST_CONCEPT_ASSERT((NumericValueConcept< ResultType >));
        BOOST_CONCEPT_ASSERT((AdaptableBinaryFunctionConcept< Divides,
            ResultType, ResultType, ResultType >));

        return (d == base_type::infinite_distance())
            ? base_type::infinite_result()
            : div(result_type(d), result_type(num_vertices(g) - 1));
    }
    Divides div;
};

template < typename Graph, typename DistanceMap >
inline mean_geodesic_measure< Graph,
    typename property_traits< DistanceMap >::value_type, double >
measure_mean_geodesic(const Graph&, DistanceMap)
{
    return mean_geodesic_measure< Graph,
        typename property_traits< DistanceMap >::value_type, double >();
}

template < typename T, typename Graph, typename DistanceMap >
inline mean_geodesic_measure< Graph,
    typename property_traits< DistanceMap >::value_type, T >
measure_mean_geodesic(const Graph&, DistanceMap)
{
    return mean_geodesic_measure< Graph,
        typename property_traits< DistanceMap >::value_type, T >();
}

// This is a little different because it's expected that the result type
// should (must?) be the same as the distance type. There's a type of
// transitivity in this thinking... If the average of distances has type
// X then the average of x's should also be type X. Is there a case where this
// is not true?
//
// This type is a little under-genericized... It needs generic parameters
// for addition and division.
template < typename Graph, typename DistanceType >
struct mean_graph_distance_measure
: public geodesic_measure< Graph, DistanceType, DistanceType >
{
    typedef geodesic_measure< Graph, DistanceType, DistanceType > base_type;
    typedef typename base_type::distance_type distance_type;
    typedef typename base_type::result_type result_type;

    inline result_type operator()(distance_type d, const Graph& g)
    {
        BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
        BOOST_CONCEPT_ASSERT((NumericValueConcept< DistanceType >));

        if (d == base_type::infinite_distance())
        {
            return base_type::infinite_result();
        }
        else
        {
            return d / result_type(num_vertices(g));
        }
    }
};

template < typename Graph, typename DistanceMap >
inline mean_graph_distance_measure< Graph,
    typename property_traits< DistanceMap >::value_type >
measure_graph_mean_geodesic(const Graph&, DistanceMap)
{
  