18 using namespace KKMLL;
23 mlClass (right.mlClass),
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
76 KKQueue<ClassStatistic>::PushOnBack (stat);
77 imageClassIndex.insert (pair<MLClassPtr, ClassStatisticPtr> (stat->MLClass (), stat));
84 KKQueue<ClassStatistic>::PushOnFront (stat);
85 imageClassIndex.insert (pair<MLClassPtr, ClassStatisticPtr> (stat->MLClass (), stat));
93 ClassStatisticList::const_iterator idx;
94 for (idx = right.begin (); idx != right.end (); idx++)
100 (*leftStat)
+= (*rightStat);
114 map<MLClassPtr, ClassStatisticPtr>::const_iterator idx;
115 idx = imageClassIndex.find (mlClass);
116 if (idx == imageClassIndex.end ())
167 sort (begin (), end (), c);
177 sort (begin (), end (), c);
185 <<
"Class Name" <<
"\t" <<
"Count" << endl;
189 for (idx = begin (); idx != end (); idx++)
192 r << cs->Name () <<
"\t" << cs->Count () << endl;
200 std::map<MLClassPtr, ClassStatisticPtr>::const_iterator idx;
201 idx = imageClassIndex.find (mlClass);
202 if (idx == imageClassIndex.end ())
205 return idx->second->Count ();
const KKStr & Name() const
bool operator()(ClassStatisticPtr p1, ClassStatisticPtr p2)
MLClassPtr MLClass() const
const ClassStatistic & operator+=(const ClassStatistic &right)
void PushOnBack(ClassStatisticPtr stat)
ClassStatisticPtr LookUpByMLClass(MLClassPtr mlClass) const
ClassStatistic(const ClassStatistic &right)
ClassStatistic * ClassStatisticPtr
void PrintReport(std::ostream &r)
unsigned __int32 kkuint32
const ClassStatisticList & operator+=(const ClassStatisticList &right)
kkint32 operator[](MLClassPtr mlClass)
void PushOnFront(ClassStatisticPtr stat)
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
static const KKStr & EmptyStr()
Static method that returns an Empty String.
ClassStatisticList(bool _owner)
const KKStr & UpperName() const
const KKStr & Name() const
Used by routines that retrieve Class statistics from FeatureVectorList instances. ...
bool operator()(ClassStatisticPtr p1, ClassStatisticPtr p2)
ClassStatistic(MLClassPtr _mlClass, kkuint32 _count)
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
bool operator<(const KKStr &right) const
ClassStatisticSortComparrison()