]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/graph/exterior_property.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / graph / exterior_property.hpp
index f920939f3a13e6d81427cd40f5baa89e26864ae8..281b7bb2a90652cace297d2ef18aa236785d85ba 100644 (file)
 #include <boost/graph/property_maps/container_property_map.hpp>
 #include <boost/graph/property_maps/matrix_property_map.hpp>
 
-namespace boost {
-namespace detail {
+namespace boost
+{
+namespace detail
+{
     // The vector matrix provides a little abstraction over vector
     // types that makes matrices easier to work with.
-    template <typename Value>
-    struct vector_matrix
+    template < typename Value > struct vector_matrix
     {
-        typedef std::vector<Value> container_type;
-        typedef std::vector<container_type> matrix_type;
+        typedef std::vector< Value > container_type;
+        typedef std::vector< container_type > matrix_type;
 
         typedef container_type value_type;
         typedef container_type& reference;
@@ -30,15 +31,14 @@ namespace detail {
         // Instantiate the matrix over n elements (creates an n by n matrix).
         // The graph has to be passed in order to ensure the index maps
         // are constructed correctly when returning indexible elements.
-        inline vector_matrix(size_type n)
-            : m_matrix(n, container_type(n))
-        { }
+        inline vector_matrix(size_type n) : m_matrix(n, container_type(n)) {}
 
-        inline reference operator [](size_type n)
-        { return m_matrix[n]; }
+        inline reference operator[](size_type n) { return m_matrix[n]; }
 
-        inline const_reference operator [](size_type n) const
-        { return m_matrix[n]; }
+        inline const_reference operator[](size_type n) const
+        {
+            return m_matrix[n];
+        }
 
         matrix_type m_matrix;
     };
@@ -56,21 +56,21 @@ namespace detail {
  * solution should not be especially difficult, but will require an extension
  * of type traits to affect the type selection.
  */
-template <typename Graph, typename Key, typename Value>
+template < typename Graph, typename Key, typename Value >
 struct exterior_property
 {
     typedef Key key_type;
     typedef Value value_type;
 
-    typedef std::vector<Value> container_type;
-    typedef container_property_map<Graph, Key, container_type> map_type;
+    typedef std::vector< Value > container_type;
+    typedef container_property_map< Graph, Key, container_type > map_type;
 
-    typedef detail::vector_matrix<Value> matrix_type;
-    typedef matrix_property_map<Graph, Key, matrix_type> matrix_map_type;
+    typedef detail::vector_matrix< Value > matrix_type;
+    typedef matrix_property_map< Graph, Key, matrix_type > matrix_map_type;
 
 private:
-    exterior_property() { }
-    exterior_property(const exterior_property&) { }
+    exterior_property() {}
+    exterior_property(const exterior_property&) {}
 };
 
 /**
@@ -78,12 +78,11 @@ private:
  * vertex property for the given value type. The Graph parameter is required to
  * model the VertexIndexGraph concept.
  */
-template <typename Graph, typename Value>
-struct exterior_vertex_property
+template < typename Graph, typename Value > struct exterior_vertex_property
 {
-    typedef exterior_property<
-            Graph, typename graph_traits<Graph>::vertex_descriptor, Value
-        property_type;
+    typedef exterior_property< Graph,
+        typename graph_traits< Graph >::vertex_descriptor, Value >
+        property_type;
     typedef typename property_type::key_type key_type;
     typedef typename property_type::value_type value_type;
     typedef typename property_type::container_type container_type;
@@ -97,12 +96,11 @@ struct exterior_vertex_property
  * edge property for the given value type. The Graph parameter is required to
  * model the EdgeIndexGraph concept.
  */
-template <typename Graph, typename Value>
-struct exterior_edge_property
+template < typename Graph, typename Value > struct exterior_edge_property
 {
-    typedef exterior_property<
-            Graph, typename graph_traits<Graph>::edge_descriptor, Value
-        property_type;
+    typedef exterior_property< Graph,
+        typename graph_traits< Graph >::edge_descriptor, Value >
+        property_type;
     typedef typename property_type::key_type key_type;
     typedef typename property_type::value_type value_type;
     typedef typename property_type::container_type container_type;