本文整理汇总了C++中CDotFeatures::get_feature_class方法的典型用法代码示例。如果您正苦于以下问题:C++ CDotFeatures::get_feature_class方法的具体用法?C++ CDotFeatures::get_feature_class怎么用?C++ CDotFeatures::get_feature_class使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDotFeatures
的用法示例。
在下文中一共展示了CDotFeatures::get_feature_class方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: check_members
void CExactInferenceMethod::check_members()
{
if (!m_labels)
SG_ERROR("No labels set\n")
if (m_labels->get_label_type() != LT_REGRESSION)
SG_ERROR("Expected RegressionLabels\n")
if (!m_features)
SG_ERROR("No features set!\n")
if (m_labels->get_num_labels() != m_features->get_num_vectors())
SG_ERROR("Number of training vectors does not match number of labels\n")
if(m_features->get_feature_class() == C_COMBINED)
{
CDotFeatures* feat =
(CDotFeatures*)((CCombinedFeatures*)m_features)->
get_first_feature_obj();
if (!feat->has_property(FP_DOT))
SG_ERROR("Specified features are not of type CFeatures\n")
if (feat->get_feature_class() != C_DENSE)
SG_ERROR("Expected Simple Features\n")
if (feat->get_feature_type() != F_DREAL)
SG_ERROR("Expected Real Features\n")
SG_UNREF(feat);
}
示例2: apply_regression
CRegressionLabels* CGaussianProcessRegression::apply_regression(CFeatures* data)
{
if (data)
{
if(data->get_feature_class() == C_COMBINED)
{
CDotFeatures* feat =
(CDotFeatures*)((CCombinedFeatures*)data)->
get_first_feature_obj();
if (!feat->has_property(FP_DOT))
SG_ERROR("Specified features are not of type CFeatures\n")
if (feat->get_feature_class() != C_DENSE)
SG_ERROR("Expected Simple Features\n")
if (feat->get_feature_type() != F_DREAL)
SG_ERROR("Expected Real Features\n")
SG_UNREF(feat);
}
else
{
if (!data->has_property(FP_DOT))