Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

NgbOutCooccurence.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Histogram_NgbOutCooccurence_h
00002 #define Impala_Core_Histogram_NgbOutCooccurence_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Pattern/Cnum.h"
00006 #include "Core/Array/Element/E1Cast.h"
00007 #include "Core/Histogram/Histogram2dTem.h"
00008 
00009 namespace Impala
00010 {
00011 namespace Core
00012 {
00013 namespace Histogram
00014 {
00015 
00016 
00019 //template<class HistT, class ArrayT>
00020 class NgbOutCooccurence
00021 {
00022 public:
00023 
00025     typedef Array::Pattern::TagLoop IteratorCategory;
00026 
00028     typedef Array::Pattern::Tag1Phase PhaseCategory;
00029 
00030     //typedef typename ArrayT::StorType StorType;
00031     //typedef typename ArrayT::ArithType ArithType;
00032 
00034     NgbOutCooccurence(Histogram2dTem<double>* hist)
00035     {
00036         mHist = hist;
00037     }
00038 
00040     ~NgbOutCooccurence()
00041     {
00042     }
00043 
00045     int
00046     Width()
00047     {
00048         return 3;
00049     }
00050 
00052     int
00053     Height()
00054     {
00055         return 3;
00056     }
00057 
00059     void
00060     Init(int x, int y, const double& value)
00061     {
00062         //ILOG_DEBUG("Init called: (x,y)=(" <<x<< "," <<y<< ") value = " << value);
00063         mCompareValue = value;
00064     }
00065 
00067     void
00068     NextEl(int x, int y, const double& value)
00069     {
00070         ILOG_DEBUG("NextEl called: (x,y)=(" <<x<< "," <<y<< ") value = " << value);
00071         if(x!=1 || y!=1)
00072         {
00073             mHist->AddWeightSafe(mCompareValue, value, 1.);
00074             ILOG_DEBUG("adding (" << value << "," << mCompareValue << ")");
00075         }
00076     }
00077 
00079     double
00080     Result() const
00081     {
00082         return 0;
00083     }
00084 
00085 private:
00086     double mCompareValue;
00087     Histogram2dTem<double>* mHist;
00088     ILOG_VAR_DEC;
00089 };
00090 
00091 ILOG_VAR_INIT(NgbOutCooccurence, Impala.Core.Histogram);
00092 
00093 
00094 } // namespace Histogram
00095 } // namespace Core
00096 } // namespace Impala
00097 
00098 #endif

Generated on Fri Mar 19 09:31:10 2010 for ImpalaSrc by  doxygen 1.5.1