00001 // Copyright 2007, Massachusetts Institute of Technology. 00002 // The use of this code is permitted for research only. There is 00003 // absolutely no warranty for this software. 00004 // 00005 // Author: John Lee (jjl@mit.edu) 00006 // 00007 00008 #ifndef PYRAMIDS_VG_PYRAMID_MAKER_H 00009 #define PYRAMIDS_VG_PYRAMID_MAKER_H 00010 00011 #include "clustering/hierarchical-clusterer.h" 00012 #include "histograms/multi-resolution-histogram.h" 00013 #include "point_set/point.h" 00014 #include "point_set/point-set.h" 00015 #include "point_set/point-set-list.h" 00016 #include "pyramids/pyramid-maker.h" 00017 #include "util/distance-computer.h" 00018 #include "util/sparse-vector.h" 00019 00020 namespace libpmk { 00022 00026 class VGPyramidMaker : public PyramidMaker { 00027 public: 00034 VGPyramidMaker(const HierarchicalClusterer& c, 00035 const DistanceComputer& distance_computer); 00036 00037 virtual MultiResolutionHistogram* MakePyramid(const PointSet& point_set) = 0; 00038 00039 protected: 00040 const HierarchicalClusterer& clusterer_; 00041 00043 const Tree<PointTreeNode>& centers_; 00044 const DistanceComputer& distance_computer_; 00045 00048 00065 bool GetMembershipPath(const Point& f, LargeIndex* out_path, 00066 vector<double>* out_distances); 00067 }; 00068 } // namespace libpmk 00069 00070 #endif // PYRAMIDS_INPUT_SPECIFIC_VG_PYRAMID_MAKER_H