dune-istl  2.2.0
properties.hh
Go to the documentation of this file.
1 #ifndef DUNE_ISTL_AMG_PROPERTIES_HH
2 #define DUNE_ISTL_AMG_PROPERTIES_HH
3 
4 #include <dune/common/propertymap.hh>
5 
6 namespace Dune
7 {
8 
9  namespace Amg
10  {
25  {};
26 
27 
34  template<typename C, typename K, std::size_t i,typename T=typename C::ValueType,
35  typename R = typename C::Reference>
37  : public RAPropertyMapHelper<R,
38  RandomAccessBundledPropertyMap<C,K,i,T,R> >
39  {
40  public:
42  typedef C Container;
43 
45  typedef R Reference;
46 
48  typedef K Key;
49 
53  typedef LvaluePropertyMapTag Category;
54 
55  enum{
57  index = i
58  };
59 
65  Reference operator[](const Key& key) const
66  {
67  return container_[key][index];
68  }
69 
75  : container_(&container)
76  {}
77 
80  : container_(0)
81  {}
82 
83  private:
85  Container* container_;
86  };
87  }
88 }
89 
90 #endif