Go to the documentation of this file.00001 #ifndef ApproxMVBB_Common_MyContainerTypeDefs_hpp
00002 #define ApproxMVBB_Common_MyContainerTypeDefs_hpp
00003
00004
00005
00006
00007 #include <vector>
00008 #include <map>
00009 #include <unordered_map>
00010 #include <Eigen/StdVector>
00011
00012 #include <Eigen/Dense>
00013
00017 namespace ApproxMVBB{
00018 namespace MyContainers {
00019
00020
00021 template<typename Key, typename Type, typename Comp = std::less<Key> >
00022 using StdMapAligned = std::map<Key, Type, Comp, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
00023
00024
00025 template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> >
00026 using StdUMapAligned = std::unordered_map<Key, Type, Hash, Pred, Eigen::aligned_allocator<std::pair<const Key, Type> > >;
00027
00028
00029 template<typename Type >
00030 using StdVecAligned = std::vector<Type, Eigen::aligned_allocator<Type> >;
00031
00032 }
00033 }
00034
00038 #define ApproxMVBB_DEFINE_CONTAINER_TYPES \
00039 \
00040 template<typename Key, typename Type, typename Comp = std::less<Key> > \
00041 using StdMapAligned = ApproxMVBB::MyContainers::StdMapAligned<Key, Type, Comp >; \
00042 \
00043 template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> > \
00044 using StdUMapAligned = ApproxMVBB::MyContainers::StdUMapAligned<Key, Type, Hash,Pred >; \
00045 \
00046 template<typename Type > \
00047 using StdVecAligned = ApproxMVBB::MyContainers::StdVecAligned< Type >;
00048
00049 #endif