Go to the documentation of this file.00001 #ifndef VOCABULARY_TREE_FEATURE_ALLOCATOR_H
00002 #define VOCABULARY_TREE_FEATURE_ALLOCATOR_H
00003
00004 #include <Eigen/Core>
00005 #include <Eigen/StdVector>
00006
00007 namespace vt {
00008
00014 template<class Feature>
00015 struct DefaultAllocator
00016 {
00017 typedef std::allocator<Feature> type;
00018 };
00019
00020
00021 template<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>
00022 struct DefaultAllocator< Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> >
00023 {
00024 typedef Eigen::aligned_allocator<Eigen::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > type;
00025 };
00026
00027 }
00028
00029 #endif