- Main Page
- Classes
- Files

- File List

# OptFrame/Parallel/MapReduce++/mri/reducer.h

    00001 #ifndef REDUCER_H
    00002 #define REDUCER_H
    00003
    00005 template<class KeyA, class A, class KeyB, class B, class C>
    00006 class Reducer
    00007 {
    00008 public:
    00010 #ifndef MRI_USE_MULTIMAP
    00011         virtual vector< pair<KeyB,C> > run( vector< pair<KeyB,B> > & ) = 0 ;
    00012 #else
    00013         virtual vector< pair<KeyB,C> > run( multimap<KeyB,B> & ) = 0 ;
    00014 #endif
    00015
    00016         virtual pair<KeyB,C> reduce( pair<KeyB, vector<B> > ) = 0 ;
    00017 private:
    00018         MapReduce<KeyA,A,KeyB,B,C> * mapReduce;
    00019 };
    00020
    00022 class StrReducer : public Reducer<string,string,string,string,string> {};
    00023
    00024 #endif /* REDUCER_H */

All Classes Functions