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

void Impala::Core::Histogram::TestEntropy::testKnownValues (  )  [inline]

Definition at line 57 of file TestEntropy.h.

References Impala::Core::Histogram::Entropy(), and ILOG_DEBUG.

00058     {
00059         int data1[1] = {1};
00060         int data2[2] = {1, 1};
00061         int data4[4] = {1, 1, 1, 1};
00062         int data8[8] = {1, 1, 1, 1, 1, 1, 1, 1};
00063         int data1234[4] = {1, 2, 3, 4};
00064         int data13258[5] = {1, 3, 2, 5, 8};
00065         Histogram1dTem<int> hist1(0, 1, 1, 0, data1);
00066         Histogram1dTem<int> hist2(0, 1, 2, 0, data2);
00067         Histogram1dTem<int> hist4(0, 1, 4, 0, data4);
00068         Histogram1dTem<int> hist8(0, 1, 8, 0, data8);
00069         Histogram1dTem<int> hist1234(0, 1, 4, 0, data1234);
00070         Histogram1dTem<int> hist13258(0, 1, 5, 0, data13258);
00071         CPPUNIT_ASSERT_EQUAL(0., Entropy(&hist1));
00072         CPPUNIT_ASSERT_EQUAL(1., Entropy(&hist2));
00073         CPPUNIT_ASSERT_EQUAL(2., Entropy(&hist4));
00074         CPPUNIT_ASSERT_EQUAL(3., Entropy(&hist8));
00075         ILOG_DEBUG("\n1.8464: "<< Entropy(&hist1234));
00076         ILOG_DEBUG("\n2.0182: "<< Entropy(&hist13258));
00077     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:12:36 2010 for ImpalaSrc by  doxygen 1.5.1