point_traits.hpp 802 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2004, 2005 The Trustees of Indiana University.
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Authors: Douglas Gregor
  6. // Andrew Lumsdaine
  7. #ifndef BOOST_GRAPH_POINT_TRAITS_HPP
  8. #define BOOST_GRAPH_POINT_TRAITS_HPP
  9. #include <cstddef>
  10. namespace boost
  11. {
  12. namespace graph
  13. {
  14. template < typename Point > struct point_traits
  15. {
  16. // The type of each component of the point
  17. typedef typename Point::component_type component_type;
  18. // The number of dimensions in the point
  19. static std::size_t dimensions(const Point& point);
  20. };
  21. }
  22. } // end namespace boost::graph
  23. #endif // BOOST_GRAPH_POINT_TRAITS_HPP