1 // CDatum, CDatumListViewItem classes
2 // Copyright © 2009 The University of Chicago
7 #include <q3textstream.h>
10 #include <math.h> //log
14 #include <q3listview.h>
16 class CStringSurrogate
;
22 class CDatumListViewItem
: public Q3ListViewItem
25 CDatumListViewItem( Q3ListView
* parent
= NULL
);
26 CDatumListViewItem( Q3ListView
*parent
,
27 QString
= QString::null
,
29 CDatumListViewItem( Q3ListViewItem
*parent
,
30 QString
= QString::null
,
33 virtual QString
text ( int ) const;
34 virtual QString
key ( int, bool ) const;
35 CDatum
* GetDatum() { return m_datum
; }
36 void SetDatum( CDatum
* pDatum
) { m_datum
= pDatum
; }
42 class CDatum
: public CParse
47 //CVeryLong m_Count; //this should never get to zero.
48 //CVeryLong m_Frequency;//between 0 and 1; = this->Count / Lexicon->TotalCount
49 double m_Count
; //this should never get to zero.
57 CDatum( CStringSurrogate
& );
59 void SetCount( double i
);
61 // double GetInformationContent( CMiniLexicon* Lexicon ); todo: put this back
63 void SetFrequency( float f
);
64 void IncrementCount( CVeryLong
& );
65 void IncrementCount();