properties.hh
Go to the documentation of this file.00001 #ifndef DUNE_ISTL_AMG_PROPERTIES_HH 00002 #define DUNE_ISTL_AMG_PROPERTIES_HH 00003 00004 #include <dune/common/propertymap.hh> 00005 00006 namespace Dune 00007 { 00008 00009 namespace Amg 00010 { 00024 struct VertexVisitedTag 00025 {}; 00026 00027 00034 template<typename C, typename K, std::size_t i,typename T=typename C::ValueType, 00035 typename R = typename C::Reference> 00036 class RandomAccessBundledPropertyMap 00037 : public RAPropertyMapHelper<R, 00038 RandomAccessBundledPropertyMap<C,K,i,T,R> > 00039 { 00040 public: 00042 typedef C Container; 00043 00045 typedef R Reference; 00046 00048 typedef K Key; 00049 00053 typedef LvaluePropertyMapTag Category; 00054 00055 enum{ 00057 index = i 00058 }; 00059 00065 Reference operator[](const Key& key) const 00066 { 00067 return container_[key][index]; 00068 } 00069 00074 RandomAccessBundledPropertyMap(Container& container) 00075 : container_(&container) 00076 {} 00077 00079 RandomAccessBundledPropertyMap() 00080 : container_(0) 00081 {} 00082 00083 private: 00085 Container* container_; 00086 }; 00087 } 00088 } 00089 00090 #endif