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

virtual double Impala::Application::TagsLife::TableDataSourceWeekMap::GetNormalizedDataByID ( String  column,
int  row 
) [inline, virtual]

Reimplemented from Impala::Application::MediaTable::TableDataSource.

Definition at line 59 of file TableDataSourceWeekMap.h.

References mTotalRows, and mWeekStats.

00060     {
00061         if (column == "contribution") {
00062             if(mWeekStats.count(row) == 0 || mWeekStats[row]->views == 0) return 0;
00063             return (double)mWeekStats[row]->mostPopularPhoto->views/(double)mWeekStats[row]->views;
00064         }
00065 
00066         double v = row / (double)mTotalRows;
00067         if (column == "red")
00068             return v;
00069         if (column == "green")
00070             return 1.0 - v;
00071         if (column == "blue") {
00072             return (row % 10) / 10.0;
00073         }
00074 
00075         return 0.0;
00076     }


Generated on Fri Mar 19 10:51:35 2010 for ImpalaSrc by  doxygen 1.5.1