grid_graph_cc.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //=======================================================================
  2. // Copyright 2009 Trustees of Indiana University.
  3. // Authors: Michael Hansen, Andrew Lumsdaine
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //=======================================================================
  9. #include <boost/graph/graph_archetypes.hpp>
  10. #include <boost/graph/graph_concepts.hpp>
  11. #include <boost/graph/grid_graph.hpp>
  12. #include <boost/concept/assert.hpp>
  13. using namespace boost;
  14. template <unsigned int Dims>
  15. void check() {
  16. typedef grid_graph<Dims> Graph;
  17. typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
  18. typedef typename graph_traits<Graph>::edge_descriptor Edge;
  19. BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept<Graph> ));
  20. BOOST_CONCEPT_ASSERT((VertexListGraphConcept<Graph> ));
  21. BOOST_CONCEPT_ASSERT((EdgeListGraphConcept<Graph> ));
  22. BOOST_CONCEPT_ASSERT((IncidenceGraphConcept<Graph> ));
  23. BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept<Graph> ));
  24. BOOST_CONCEPT_ASSERT((AdjacencyMatrixConcept<Graph> ));
  25. BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> ));
  26. BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept<Graph, Edge, edge_index_t> ));
  27. }
  28. int main (int, char*[]) {
  29. check<0>();
  30. check<1>();
  31. check<2>();
  32. check<3>();
  33. check<4>();
  34. return (0);
  35. }