Dune Core Modules (2.5.2)

properties.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ISTL_AMG_PROPERTIES_HH
4 #define DUNE_ISTL_AMG_PROPERTIES_HH
5 
6 #include <dune/common/propertymap.hh>
7 
8 namespace Dune
9 {
10 
11  namespace Amg
12  {
27  {};
28 
29 
36  template<typename C, typename K, std::size_t i,typename T=typename C::ValueType,
37  typename R = typename C::Reference>
39  : public RAPropertyMapHelper<R,
40  RandomAccessBundledPropertyMap<C,K,i,T,R> >
41  {
42  public:
44  typedef C Container;
45 
47  typedef R Reference;
48 
50  typedef K Key;
51 
56 
57  enum {
59  index = i
60  };
61 
67  Reference operator[](const Key& key) const
68  {
69  return container_[key][index];
70  }
71 
77  : container_(&container)
78  {}
79 
82  : container_(0)
83  {}
84 
85  private:
87  Container* container_;
88  };
89  }
90 }
91 
92 #endif
A property map that extracts one property out of a bundle using operator[]()
Definition: properties.hh:41
Reference operator[](const Key &key) const
Get the property for a key.
Definition: properties.hh:67
RandomAccessBundledPropertyMap()
The default constructor.
Definition: properties.hh:81
R Reference
The reference type of the container.
Definition: properties.hh:47
RandomAccessBundledPropertyMap(Container &container)
Constructor.
Definition: properties.hh:76
K Key
The key of the property map.
Definition: properties.hh:50
LvaluePropertyMapTag Category
The category of the property map.
Definition: properties.hh:55
C Container
The container that holds the properties.
Definition: properties.hh:44
@ index
The index of the property in the bundle.
Definition: properties.hh:59
Dune namespace.
Definition: alignment.hh:11
Tag idnetifying the visited property of a vertex.
Definition: properties.hh:27
Tag for the category of lvalue property maps.
Definition: propertymap.hh:55
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 9, 22:29, 2024)