Direct Graphical Models
v.1.7.0
TrainEdgePotts.cpp
1
#include "TrainEdgePotts.h"
2
#include "macroses.h"
3
4
namespace
DirectGraphicalModels
5
{
6
Mat
CTrainEdgePotts::calculateEdgePotentials
(
const
Mat &,
const
Mat &,
const
vec_float_t &vParams)
const
7
{
8
if
(vParams.size() == 1)
return
getDefaultEdgePotentials
(vParams[0],
m_nStates
);
9
else
if
(vParams.size() ==
m_nStates
)
return
getDefaultEdgePotentials
(vParams);
10
else
DGM_ASSERT_MSG(
false
,
"Wrong number of parameters: %zu. It must be either %d or %u"
, vParams.size(), 1,
m_nStates
);
11
}
12
}
DirectGraphicalModels
Definition:
AveragePrecision.cpp:4
DirectGraphicalModels::CTrainEdgePotts::calculateEdgePotentials
virtual Mat calculateEdgePotentials(const Mat &featureVector1, const Mat &featureVector2, const vec_float_t &vParams) const
Returns the data-independent edge potentials.
Definition:
TrainEdgePotts.cpp:6
DirectGraphicalModels::CTrainEdge::getDefaultEdgePotentials
static Mat getDefaultEdgePotentials(float val, byte nStates)
Returns the data-independent edge potentials.
Definition:
TrainEdge.h:74
DirectGraphicalModels::CBaseRandomModel::m_nStates
byte m_nStates
The number of states (classes)
Definition:
BaseRandomModel.h:87
modules
DGM
TrainEdgePotts.cpp
Generated on Thu Feb 21 2019 13:31:15 for Direct Graphical Models by
1.8.14