point_traits.hpp 782 B

1234567891011121314151617181920212223242526272829
  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. namespace boost
  10. {
  11. namespace graph
  12. {
  13. template < typename Point > struct point_traits
  14. {
  15. // The type of each component of the point
  16. typedef typename Point::component_type component_type;
  17. // The number of dimensions in the point
  18. static std::size_t dimensions(const Point& point);
  19. };
  20. }
  21. } // end namespace boost::graph
  22. #endif // BOOST_GRAPH_POINT_TRAITS_HPP