Boost logo

Boost-Commit :

From: asutton_at_[hidden]
Date: 2007-08-24 09:23:21


Author: asutton
Date: 2007-08-24 09:23:21 EDT (Fri, 24 Aug 2007)
New Revision: 38890
URL: http://svn.boost.org/trac/boost/changeset/38890

Log:
Moved to wrong directory

Added:
   sandbox/SOC/2007/graphs/libs/graph/test/compile/bron_kerbosch_all_cliques.cpp
      - copied unchanged from r38832, /sandbox/SOC/2007/graphs/libs/graph/test/bron_kerbosch_all_cliques.cpp
Removed:
   sandbox/SOC/2007/graphs/libs/graph/test/bron_kerbosch_all_cliques.cpp

Deleted: sandbox/SOC/2007/graphs/libs/graph/test/bron_kerbosch_all_cliques.cpp
==============================================================================
--- sandbox/SOC/2007/graphs/libs/graph/test/bron_kerbosch_all_cliques.cpp 2007-08-24 09:23:21 EDT (Fri, 24 Aug 2007)
+++ (empty file)
@@ -1,76 +0,0 @@
-// (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 <iostream>
-#include <iterator>
-#include <algorithm>
-#include <vector>
-#include <map>
-#include <tr1/unordered_map>
-
-#include <boost/graph/graph_utility.hpp>
-#include <boost/graph/undirected_graph.hpp>
-#include <boost/graph/directed_graph.hpp>
-#include <boost/graph/bron_kerbosch_all_cliques.hpp>
-#include <boost/graph/erdos_renyi_generator.hpp>
-
-#include <boost/random/linear_congruential.hpp>
-
-using namespace std;
-using namespace boost;
-
-struct clique_validator
-{
- clique_validator()
- { }
-
- template <typename Clique, typename Graph>
- inline void
- clique(const Clique& c, Graph& g)
- {
- // Simply assert that each vertex in the clique is connected
- // to all others in the clique.
- typename Clique::const_iterator i, j, end = c.end();
- for(i = c.begin(); i != end; ++i) {
- for(j = c.begin(); j != end; ++j) {
- if(i != j) {
- BOOST_ASSERT(edge(*i, *j, g).second);
- }
- }
- }
- }
-};
-
-template <typename Graph>
-void test()
-{
- typedef erdos_renyi_iterator<boost::minstd_rand, Graph> er;
-
- // Generate random graphs with 15 vertices and 15% probability
- // of edge connection.
- static const size_t N = 20;
- static const float P = 0.1;
-
- boost::minstd_rand rng;
- Graph g(er(rng, N, P), er(), N);
- renumber_indices(g);
- print_edges(g, get(vertex_index, g));
-
- bron_kerbosch_all_cliques(g, clique_validator());
-}
-
-int
-main(int argc, char *argv[])
-{
- typedef undirected_graph<> Graph;
- typedef directed_graph<> DiGraph;
-
- std::cout << "*** undirected ***\n";
- test<Graph>();
-
- std::cout << "*** directed ***\n";
- test<DiGraph>();
-}


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