|
Boost-Commit : |
From: asutton_at_[hidden]
Date: 2007-08-15 08:17:02
Author: asutton
Date: 2007-08-15 08:17:00 EDT (Wed, 15 Aug 2007)
New Revision: 38671
URL: http://svn.boost.org/trac/boost/changeset/38671
Log:
Adding concept check for eccentricity, radius and diameter
Added:
sandbox/SOC/2007/graphs/libs/graph/test/concept/eccentricity_check.cpp (contents, props changed)
Text files modified:
sandbox/SOC/2007/graphs/libs/graph/test/concept/Jamfile.v2 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: sandbox/SOC/2007/graphs/libs/graph/test/concept/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/graphs/libs/graph/test/concept/Jamfile.v2 (original)
+++ sandbox/SOC/2007/graphs/libs/graph/test/concept/Jamfile.v2 2007-08-15 08:17:00 EDT (Wed, 15 Aug 2007)
@@ -11,4 +11,5 @@
[ compile degree_centrality_check.cpp ]
[ compile closeness_centrality_check.cpp ]
[ compile mean_geodesic_check.cpp ]
+ [ compile eccentricity_check.cpp ]
;
\ No newline at end of file
Added: sandbox/SOC/2007/graphs/libs/graph/test/concept/eccentricity_check.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/graphs/libs/graph/test/concept/eccentricity_check.cpp 2007-08-15 08:17:00 EDT (Wed, 15 Aug 2007)
@@ -0,0 +1,35 @@
+// (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)
+
+#include "archetypes.hpp"
+#include <boost/graph/eccentricity.hpp>
+
+using namespace std;
+using namespace boost;
+
+int
+main(int argc, char *argv[])
+{
+ typedef descriptor_archetype Vertex;
+ typedef vertex_list_graph_archetype<
+ Vertex,
+ undirected_tag,
+ allow_parallel_edge_tag
+ > Graph;
+ typedef read_write_property_map_archetype<Vertex, float> EccentricityMap;
+ typedef readable_property_map_archetype<Vertex, size_t> DistanceMap;
+ typedef readable_property_map_archetype<Vertex, DistanceMap> DistanceMatrix;
+
+ Graph& g = static_object<Graph>::get();
+ EccentricityMap em;
+ DistanceMatrix dm;
+
+ eccentricity(g, dm, em);
+ graph_radius(g, em);
+ graph_diameter(g, em);
+
+ return 0;
+}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk