KSquare Utilities
KKMLL::ClassStatistic Class Reference

Used by routines that retrieve Class statistics from FeatureVectorList instances. More...

#include <ClassStatistic.h>

Public Member Functions

 ClassStatistic (const ClassStatistic &right)
 
 ClassStatistic (MLClassPtr _mlClass, kkuint32 _count)
 
kkuint32 Count () const
 
void Increment ()
 
MLClassPtr MLClass () const
 
const KKStrName () const
 
const ClassStatisticoperator+= (const ClassStatistic &right)
 

Detailed Description

Used by routines that retrieve Class statistics from FeatureVectorList instances.

Definition at line 14 of file ClassStatistic.h.

Constructor & Destructor Documentation

ClassStatistic::ClassStatistic ( const ClassStatistic right)

Definition at line 22 of file ClassStatistic.cpp.

Referenced by KKMLL::ClassStatisticList::operator+=().

22  :
23  mlClass (right.mlClass),
24  count (right.count)
25 {
26 }
ClassStatistic::ClassStatistic ( MLClassPtr  _mlClass,
kkuint32  _count 
)

Definition at line 29 of file ClassStatistic.cpp.

Referenced by KKMLL::FeatureVectorList::GetClassStatistics().

31  :
32  mlClass (_mlClass),
33  count (_count)
34 {}

Member Function Documentation

void KKMLL::ClassStatistic::Increment ( )
inline

Definition at line 26 of file ClassStatistic.h.

Referenced by KKMLL::FeatureVectorList::GetClassStatistics().

26 {count++;}
const KKStr & ClassStatistic::Name ( ) const

Definition at line 38 of file ClassStatistic.cpp.

References KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), and KKMLL::MLClass::Name().

39 {
40  if (mlClass)
41  return mlClass->Name ();
42  else
43  return KKStr::EmptyStr ();
44 } /* Name */
const ClassStatistic & ClassStatistic::operator+= ( const ClassStatistic right)

Definition at line 48 of file ClassStatistic.cpp.

References Count(), and MLClass().

Referenced by KKMLL::ClassStatisticList::operator+=().

49 {
50  if (mlClass != right.MLClass ())
51  {
52  cerr << std::endl << std::endl << std::endl
53  << "ClassStatistic::operator+= Class Names Do Not Match" << std::endl
54  << " LeftClass[" << mlClass->Name () << "] RightClass[" << right.Name () << "[" << std::endl
55  << std::endl;
56  return *this;
57  }
58 
59  count += right.Count ();
60 
61  return *this;
62 }
HTMLReport &__cdecl endl(HTMLReport &htmlReport)
Definition: HTMLReport.cpp:240
const KKStr & Name() const
MLClassPtr MLClass() const
kkuint32 Count() const

The documentation for this class was generated from the following files: