当前位置: 首页>>代码示例>>C++>>正文


C++ CDotFeatures::get_feature_class方法代码示例

本文整理汇总了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);
	}
开发者ID:AlexBinder,项目名称:shogun,代码行数:31,代码来源:ExactInferenceMethod.cpp

示例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))
开发者ID:AlexBinder,项目名称:shogun,代码行数:26,代码来源:GaussianProcessRegression.cpp


注:本文中的CDotFeatures::get_feature_class方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。