| pktools 2.6.7 Processing Kernel for geospatial data

Public Member Functions | Protected Attributes | List of all members
CostFactory Class Referenceabstract
Inheritance diagram for CostFactory:
[legend]
Collaboration diagram for CostFactory:
[legend]

## Public Member Functions
| CostFactory (unsigned short cv, short verbose)
void | setCv (unsigned short cv)
void | setClassValueMap (const std::string &classname, short classvalue)
std::map< std::string, short > | getClassValueMap ()
std::vector< std::string > | getNameVector ()
void | setNameVector (std::vector< std::string > &nameVector)
int | getClassIndex (std::string classname) const
void | pushBackClassName (std::string classname)
void | pushBackName (std::string classname)
void | setNcTraining (const std::vector< unsigned int > nctraining)
void | setNcTest (const std::vector< unsigned int > nctest)
virtual double | getCost (const std::vector< Vector2d< float > > &trainingFeatures)=0

## Protected Attributes
confusionmatrix::ConfusionMatrix | m_cm
std::map< std::string, short > | m_classValueMap
std::vector< std::string > | m_nameVector
std::vector< unsigned int > | m_nctraining
std::vector< unsigned int > | m_nctest
unsigned short | m_cv
short | m_classvalue
short | m_verbose

## Detailed Description

Definition at line 30 of file CostFactory.h.

## Constructor & Destructor Documentation

## ◆ CostFactory() [1/2]

CostFactory::CostFactory | ( | void |  | ) |
| inline

Definition at line 32 of file CostFactory.h.

32{};

## ◆ CostFactory() [2/2]

CostFactory::CostFactory | ( | unsigned short | cv,
|  | short | verbose
| ) |  |
| inline

Definition at line 33 of file CostFactory.h.

33: m_cv(cv), m_verbose(verbose){};

## ◆ ~CostFactory()

virtual CostFactory::~CostFactory | ( | void |  | ) |
| inline virtual

Definition at line 35 of file CostFactory.h.

35{};

## Member Function Documentation

## ◆ getClassIndex()

int CostFactory::getClassIndex | ( | std::string | classname | ) | const
| inline

Definition at line 41 of file CostFactory.h.

41{return m_cm.getClassIndex(classname);};

## ◆ getClassValueMap()

std::map< std::string, short > CostFactory::getClassValueMap | ( |  | ) |
| inline

Definition at line 38 of file CostFactory.h.

38{return m_classValueMap;};

## ◆ getNameVector()

std::vector< std::string > CostFactory::getNameVector | ( |  | ) |
| inline

Definition at line 39 of file CostFactory.h.

39{return m_nameVector;};

## ◆ pushBackClassName()

void CostFactory::pushBackClassName | ( | std::string | classname | ) |
| inline

Definition at line 43 of file CostFactory.h.

43{m_cm.pushBackClassName(classname,true);};//doSort=true

## ◆ pushBackName()

void CostFactory::pushBackName | ( | std::string | classname | ) |
| inline

Definition at line 45 of file CostFactory.h.

45{m_nameVector.push_back(classname);};

## ◆ setClassValueMap()

void CostFactory::setClassValueMap | ( | const std::string & | classname,
|  | short | classvalue
| ) |  |
| inline

Definition at line 37 of file CostFactory.h.

37{ m_classValueMap[classname]=classvalue;};

## ◆ setCv()

void CostFactory::setCv | ( | unsigned short | cv | ) |
| inline

Definition at line 36 of file CostFactory.h.

36{m_cv=cv;};

## ◆ setNameVector()

void CostFactory::setNameVector | ( | std::vector< std::string > & | nameVector | ) |
| inline

Definition at line 40 of file CostFactory.h.

40{m_nameVector=nameVector;};

## ◆ setNcTest()

void CostFactory::setNcTest | ( | const std::vector< unsigned int > | nctest | ) |
| inline

Definition at line 47 of file CostFactory.h.

47{m_nctest=nctest;};

## ◆ setNcTraining()

void CostFactory::setNcTraining | ( | const std::vector< unsigned int > | nctraining | ) |
| inline

Definition at line 46 of file CostFactory.h.

46{m_nctraining=nctraining;};

## Member Data Documentation

## ◆ m_classvalue

short CostFactory::m_classvalue
| protected

Definition at line 59 of file CostFactory.h.

## ◆ m_classValueMap

std::map<std::string,short> CostFactory::m_classValueMap
| protected

Definition at line 53 of file CostFactory.h.

## ◆ m_cm

confusionmatrix::ConfusionMatrix CostFactory::m_cm
| protected

Definition at line 52 of file CostFactory.h.

## ◆ m_cv

unsigned short CostFactory::m_cv
| protected

Definition at line 57 of file CostFactory.h.

## ◆ m_nameVector

std::vector<std::string> CostFactory::m_nameVector
| protected

Definition at line 54 of file CostFactory.h.

## ◆ m_nctest

std::vector<unsigned int> CostFactory::m_nctest
| protected

Definition at line 56 of file CostFactory.h.

## ◆ m_nctraining

std::vector<unsigned int> CostFactory::m_nctraining
| protected

Definition at line 55 of file CostFactory.h.

## ◆ m_verbose

short CostFactory::m_verbose
| protected

Definition at line 60 of file CostFactory.h.

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

- /tmp/slackdce/slackrepo.NvCr9x/build_pktools/PKTOOLS-2.6.7.6/src/algorithms/CostFactory.h