visitorspecializations.hxx

Go to the documentation of this file.
00001 #pragma once
00002 #ifndef OPENGM_VISITORSPECIALIZATIONS_HXX
00003 #define OPENGM_VISITORSPECIALIZATIONS_HXX
00004 
00006 
00007 namespace opengm {
00008 
00009    template<class INF>
00010       class VerboseVisitor;
00011    template<class INF>
00012       class TimingVisitor;
00013    template<class INF>
00014       class VerboseVisitorBase;
00015    template<class INF>
00016       class TimingVisitorBase;
00017    template<class GM,class ACC>
00018       class LazyFlipper;
00019    
00020    template< class GM,class ACC >
00021    class VerboseVisitor< LazyFlipper<GM,ACC> >
00022    : public VerboseVisitorBase< LazyFlipper<GM,ACC> > {
00023    public:
00024       VerboseVisitor(const size_t visitNth=1, bool multiline=true )
00025       : VerboseVisitorBase< LazyFlipper<GM,ACC> >(visitNth,multiline) {
00026       }  
00027       void operator() (
00028          const LazyFlipper<GM,ACC> & lf,
00029          const typename LazyFlipper<GM,ACC>::ValueType value,
00030          const typename LazyFlipper<GM,ACC>::ValueType bound,
00031          const size_t subgraphSize,
00032          const size_t subgraphForrestSize
00033       ) {
00034          this->visit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00035       }
00036       void begin(
00037          const LazyFlipper<GM,ACC> & lf,
00038          const typename LazyFlipper<GM,ACC>::ValueType value,
00039          const typename LazyFlipper<GM,ACC>::ValueType bound,
00040          const size_t subgraphSize,
00041          const size_t subgraphForrestSize
00042       ) {
00043          this->beginVisit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00044       }
00045       void end (
00046          const LazyFlipper<GM,ACC> & lf,
00047          const typename LazyFlipper<GM,ACC>::ValueType value,
00048          const typename LazyFlipper<GM,ACC>::ValueType bound,
00049          const size_t subgraphSize,
00050          const size_t subgraphForrestSize
00051       ) {
00052          this->endVisit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00053       }
00054    };
00055    
00056    template< class GM,class ACC >
00057    class TimingVisitor< LazyFlipper<GM,ACC> >
00058    : public TimingVisitorBase< LazyFlipper<GM,ACC> > {
00059    public:
00060       TimingVisitor(
00061          const size_t visitNth=1,
00062          size_t reserve=0,
00063          bool verbose=false,
00064          bool multilineCout=true
00065       )
00066       :TimingVisitorBase< LazyFlipper<GM,ACC> >(visitNth,reserve,verbose,multilineCout) {
00067       }  
00068       void operator()(
00069          const LazyFlipper<GM,ACC> & lf,
00070          const typename LazyFlipper<GM,ACC>::ValueType value,
00071          const typename LazyFlipper<GM,ACC>::ValueType bound,
00072          const size_t subgraphSize,
00073          const size_t subgraphForrestSize
00074       ) {
00075          this->visit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00076       }
00077       void begin(
00078          const LazyFlipper<GM,ACC> & lf,
00079          const typename LazyFlipper<GM,ACC>::ValueType value,
00080          const typename LazyFlipper<GM,ACC>::ValueType bound,
00081          const size_t subgraphSize,
00082          const size_t subgraphForrestSize
00083       ) {
00084          this->visit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00085       }
00086       void end(
00087          const LazyFlipper<GM,ACC> & lf,
00088          const typename LazyFlipper<GM,ACC>::ValueType value,
00089          const typename LazyFlipper<GM,ACC>::ValueType bound,
00090          const size_t subgraphSize,
00091          const size_t subgraphForrestSize
00092       ) {
00093          this->visit(value,bound,"subgraph-size",subgraphSize,"forrest-size",subgraphForrestSize);
00094       }
00095    };
00096 }
00097 
00099 
00100 #endif // #ifndef OPENGM_VISITORSPECIALIZATIONS_HXX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:07 2013 for OpenGM by  doxygen 1.6.3